ldap_connect now takes an optional password parameter, allowing authentication for read operations when needed