fixed user controller and using $scope.$apply directly in infinite table directive