added support for basic auth