updating code to hide button when cookie is null