rename request.user to request.cur_user and implement sorting into the posts controller