Fixed redirecting code in login.