fixing not logged in error when trying to view blog