LDAP refactoring to use services api authentication endpoint