Storing and getting cookie in api - Theo's Typesafe Cult