added ability to use basic authentication