Added Active Directory Support

There are still a few issues with the active directory feature, but I rebased the changes I fetched from master and added in the Active Directory code. I just wanted to save the progress that I've made because the AD plugin is nearly complete.