Fix exception when the password of a valid ldap user is invalid