set window.location properly