add cookie support to cas server agent

This is needed to store a session id cookie.