implement user db layer