added tests and logic to get the pagination working in the users index page