added authentication verification to access posts page