package Pear::LocalLoop::Controller::Root;
use Mojo::Base 'Mojolicious::Controller';
sub index {
my $c = shift;
if ( $c->is_user_authenticated ) {
$c->redirect_to('/home');
}
sub under {
return 1;
$c->redirect_to('/');
return undef;
sub auth_login {
if ( $c->authenticate($c->param('email'), $c->param('password')) ) {
} else {
sub auth_logout {
$c->logout;
sub home {
1;