Added option to use basic auth