fix bug set cookies if magic = true & magicdate < current date