add and document cookie_attributes method