add GetCookie and SetCookie function for context