Added pagination and links in profiles controller