I am developing a google app engine app. I am trying to redirect user to login page when a button is clicked. To do this I set window.location.pathname to following string /_ah/login?continue=http%3A//localhost%3A8080/. However, chrome escapes the string so that the full URL becomes http://localhost:8080/_ah/login%3Fcontinue=http%3A//localhost%3A8080/, and this gives a 404 error. How can I prevent this from happening? The URL that works is http://localhost:8080/_ah/login?continue=http%3A//localhost%3A8080/