csrf issue fix and paginiation