add hooks for ldap authentication
refactor namespaces