adding loading animation

also fixed a bug in the pagination controller
Merge branch 'badams'