Detect the cookie corretly in hook_boot()