Fixed login page logic.