handle correct redirection after sign in