Fix safari cookie issue with earlier js redirect