Checking if logged in before checking notiications.