update README
improve document.cookie implementation