registering users to mongodb