Fix incorrect redirection after login.