title: Why SONAR fails at waitForQualityGate() with error 401?
body: <p>Using pipeline code, </p>
  
  <pre><code>stage ('SonarQube') {
      withSonarQubeEnv {
          dir ('mydir/') {
              sh "'${mvnHome}/bin/mvn' sonar:sonar -Dsonar.login=something -Dsonar.projectKey=someproj -Dsonar.projectName=somename"
          }
      }
      timeout(time: 15, unit: 'MINUTES') {
          def qg = waitForQualityGate()
          if (qg.status != 'OK') {
              error "Pipeline aborted due to quality gate failure: ${qg.status}"
          }
      }
  </code></pre>
  
  <p>Which progresses crrectly over the first mvn section and breaks on waitforqualitygate() operation:</p>
  
  <pre><code>org.sonarqube.ws.client.HttpException: Error 401 on http://mysonarserver/sonar/api/ce/task?id=somecode
  </code></pre>
  
  <p>the link is clickable and leads to a filled json structure.</p>
  
  <p>Why the build fails? Webhook seems to be set properly in sonar, and other sonar projects are working correctly, webhook in jenkis also seems to be active.</p>