fixed bug with basic auth on secure connections