added pagination to messages#index