Adding pagination for courses page.