added support for basic authentication when entered username and
password