Added windows authentication

.. there is a nice - - bug in this code which needs to be refactored
asap