Fixing undefined user error if blog post isn't published and not logged in.