added check for all posts pages to make sure there's a logged in user; otherwise, display restricted access page