improve redirection after login