Updates to logic  + Clean up
Updates to logic  + Clean up

Added some comments also removed debug code and changed the logic of authenticating and logign a user.
thepitagroup/adldap_craftcms,thepitagroup/adldap_craftcms