Another variant for ldap auth

This ldap auth variant configures more dynamically

Please discuss

(other small fixes also included)