persisting accounts to mongodb