handle storage event to detect token changes