Pull in ldap authentication

Hi Huw,

Thanks for fixing the build issue.  I've added the changes to make authentication with LDAP to be optional if not required, hope these changes will work better with the alternative settings in the unit test.  Could you please review and merge these changes?

Thanks

Shuang