added better failed login detection