refactored code for users to moved ldap logic to model out of controller