Add more capabilities to the LDAP auth piece

Pull in changes from a pull request to the original repo plus some of my
own changes