Fix login tests for proper handling of LDAP exceptions.