fix #1932 - Allow LDAP authentication without requiring search

This will allow authentication using $login in the Foreman ldap Account for environments where ldap users can't search. I've tested it in my environment (where ldap users can't search) but I can't test in an environment where they can. Also needs to be tested in an environment with on-the-fly user creation (can't do that here either). 

I also added two debug lines to the end. They'll give the ldap error code and message so you can see in log if it's a problem with your password or with your dn configuration.