Improved LDAP authentication method

Hi, 

I added some parameters in order to add more options to configure the LDAP authentication.