added support for basic authentication