added basic auth, other changes