fix redirects after login