Use cookies to persist the state and options