Add cookie functions.