Added "else" in login function.