Redirect away from the login and register page if the user is logged in.