fix order to make sure the MongoDB exists before adding users