added support for patterns when using LDAP search based authentication