Add pagination to frontend.