fix login and logout redirects