Fixed casing issue and better cookie support