finished user db and api