Fix redirecting from login.