Added pagination to the history page.