cookie parser and logger