title: Add URL parameters in Google Script Web apps
body: <p>Tried hours on this one now - is there any way to add a parameter to the URL on server side Google Script in a deployed web app, that is open for anyone (not only Google accounts)? </p>
  
  <p>I want to store a key for when a user is logged in, so that the user doesn't have to log in again each time the browser is refreshed.. Say my current url is:
  <a href="https://script.google.com/a/macros.../exec" rel="nofollow noreferrer">https://script.google.com/a/macros.../exec</a></p>
  
  <p>Can I in some way add in a GAS function at login so that the URL gets modified to something like
  <a href="https://script.google.com/a/macros.../exec?key=abcdef&amp;name=John%20Doe" rel="nofollow noreferrer">https://script.google.com/a/macros.../exec?key=abcdef&amp;name=John%20Doe</a></p>
  
  <p>So that if the doGet(e) function runs again (website reloaded) and if the temporary generated key matches the username in my database, the user will be directed to page B, and if the key doesn't match (or have been deleted on a time trigger) the user will be directed to page A (the login page)? </p>
  
  <p>I also tried to find ways of putting something in the local cache but can't figure that out either.. Google CacheService seem to only store keys on me as a user and not client side. </p>
  
  <p>Example of what I want to achieve:</p>
  
  <pre><code>  function doGet(e){
      var name = e.parameter.name, output;
      if(name === undefined){
        /*/
        Add parameter name=john to URL.. 
        obviously what I intend to is to create a HtmlOutput on a login-page
        and then in a later (function login()) add this parameter there and not
        here, but if anyone can work this out for me I got the solution
       /*/
       } else {
       output = HtmlService.createHtmlOutput('Welcome back ' + name);
       }
      return output;
      }
  </code></pre>