Added db.switchUser(user,passwd) in JS to let to work using another user
Distirbuted: minor improvements