v3.0 - Created login handler that redirects to login page if the user is not logged in