Refactored to include logic from commit 64373b3

Commit 64373b3 (pull request #42) broke my current changes for
Issue #16 so in order to resolve the conflicts, I'm merging LDAP
functionality that was added into the ldapManager class.
Moved string literal to a constant.