fixed register and login redirects