changed controller to authenticate and associate a user id with a post