Fixed typos and moved more stuff into lib/util for parsing signed cookies.