Refactor

TODO: ldap / http auth