retrieveCookie fetches and parses cookies. This util should help us further reduce places where we're extracting and parsing with cookies in the business logic