Added ability to specify basic auth credentials