added get_posts method to user class and set up home controller to render json