Corrected isAuthenticated function and added page to test authentication.