Fixed login/logout redirection