Fix redirect after login for internal authentication.