added cookie support and protocol test udpate