authenticate($username,$password); if(!$user) { die("Password or username is incorrect"); } $_SESSION['user_object'] = $user; header('Location: /'); ?>