fix redirect upon login/logout