Fixed login issue where uesr is not redirected to login page on first attempt.