Add setCookies function