<?php
$core = $package->compo('Core');
$user = $core->getLoggedInUser();
if (!$user->isGuest()){
$core->logoutUser();
}
$user = $core->logUserIn($_POST);
// $user = false;
if ($user==false){
//@TODO include the email address in the redirect & auto-fill the email field in the login form
$lia->gotoWithContent($package->url('/login/'));
echo
<<<HTML
<h2>Login Error</h2>
<p>We couldn't log you in. Please try again.</p>
HTML;
return;
}
$lia->goto($package->url('/'.$user->slug().'/'));
?>