fixing up the cached-value checks for cookie and token