basic auth stuff

ported the beginning of the /Auth code from unifer-server