simplify basic auth handling