how to pass logged user to next page in javascript code example Example: js go to page window.location.href = "http://example.com/new_url";