Update to permit arbitary filters being used rather than being restricted to memberof
This also fixes an issue where the Base DN wasn't used when checking the LDAP DN.