added database queries to user controllers