Added setting of cookies.