title: Users have no access to application
body: <p>I'm building an application in Google Apps Script. I'm authenticating the domain users by checking if their logonid is permitted to use the application.
  I developed it and when I entered the testing phase, I was the only user that could actually use the application.
  Although I had set the "Who has Access" combobox on the web-app publish wizard to "anyone".</p>
  
  <p>When a user executes the application he will get an exception saying he has no access when executing the first function after doGet(). Did I overlook some settings or did I do something wrong?</p>
  
  <p>I use the following classes:</p>
  
  <pre><code>UserManager
  Session
  Jdbc
  Utilities
  Logger
  </code></pre>
  
  <p>This is the function that is called after the doGet() function:</p>
  
  <pre><code>function authenticateUser() {
    try {
      var user = UserManager.getUser(Session.getActiveUser());
      Logger.log('User: ' + user.getEmail());
      if (user == undefined || user == null) {
        return {authenticated: false};
      } else {
        var auth = _getAuth();
        if (!auth.isAuthorized(user.getEmail())) {
          Logger.log('Not authorized in database.');
          return {authenticated: false};
        } else {
          var profile = auth.getProfile(user.getEmail());
          authenticated = true;
          auth.setLogin(user.getEmail());
          if(!profile.firstLogin) {
            activeProfile = profile;
          }
          activeUser = user;
          return {profile: profile, authenticated: true};
        }
      }
    } catch(ex) {
      Logger.log(ex);
      return {authenticated: false};
    }
  }
  </code></pre>