switched the cookie-parser to the cookie package and made some minor changes