added basic auth management