Ensuring safe redirects from login screen.