shutdown ldap connection when authentication completes, handle connections to ldap server that close unexpectedly
fix deprecation warning on .existsSync
handle uncaught exceptions
newline at EOF