Modifications to enable binding to LDAP server using a service account

Untested: backwards compatibility; has not been tested against an LDAP server that uses anonymous binding.