added support for ldap authentication, closes #235