Fixes login redirection.