added 'authenticate_user' to post controller and validation on post.rb for user_id