moved the cookie reading to the init section.
Merge cookiefix