fully working ldap authentication model that supports all three authentication methods