fixed failed login bug