Add setCookie and getCookie function