refactored user service to use $http instead of $resource