user.js is not needed
Clamped page parameter between 0 and number of pages - 1.
Improved pagination so that you can always move to the first or the last page.