Fix redirection when logging in