update cookie and form handling