Javascript redirection changes