added authentication check to see if a logged in user authorized to create, edit, or delete posts as an admin or author