add basic auth if provided