add basic auth handling