Added methods to create a cookie.