refactored many functions in user routes to be curried functions that resolve once all arguments are provided