removed unnecessary string comparisons in ldap search result processing
- changed log format
- fixed a memory leak caused by not freeing ldap_handle structure after unsuccessful bind