added basic auth functionality