Further work on active directory auth