added support for api-user-auth, changed logging to be more python-y