Checking for User Login

I've wrote code that will check to see if the user is authenticated. When authenticated, they then can post blogs, when not, they can only view blogs posted.