add possibility to configure the cookie store

I've spent a good hour trying to figure out why in the world I wasn't able to read the language cookie from client side js.
So I thought this might be useful.