Handle both SASL auth and proxied authentication Refactor LDAP connection code to be simpler Other small bug fixes