add cookie redirect fix