title: Jenkins Job Builder failing authentication with Jenkins due to encoding issue?
body: <p>I'm trying to run <code>jenkins-jobs update</code> for the first time on my system, but it fails on authentication.</p>
  
  <h3>Command:</h3>
  
  <p><code>jenkins-jobs --conf ./jjb.ini update jobs/</code></p>
  
  <p>Where <code>jobs</code> contains a <code>test.yml</code> - a miniature build project just for testing. <code>jjb.ini</code> is:</p>
  
  <pre><code>[jenkins]
  user=admin
  password={{ admin_api_token }} # Inserted API token here.
  url=http://127.0.0.1:8080
  query_plugins_info=False
  </code></pre>
  
  <h3>Expected result:</h3>
  
  <p>Success, and import of the example build project into Jenkins.</p>
  
  <h3>Actual result:</h3>
  
  <pre><code>INFO:jenkins_jobs.cli.subcommand.update:Updating jobs in ['jobs/'] ([])
  INFO:jenkins_jobs.builder:Number of jobs generated:  1
  INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/jenkins/__init__.py", line 557, in jenkins_request
      self._request(req))
    File "/usr/local/lib/python3.5/dist-packages/jenkins/__init__.py", line 508, in _response_handler
      response.raise_for_status()
    File "/usr/lib/python3/dist-packages/requests/models.py", line 840, in raise_for_status
      raise HTTPError(http_error_msg, response=self)
  requests.exceptions.HTTPError: 401 Client Error: Invalid password/token for user: b'admin' for url: http://127.0.0.1:8080/crumbIssuer/api/json
  </code></pre>
  
  <p>What catches my eye here is that the authentication fails for <code>b'admin</code>, not for <code>admin</code>. This is also reflected in the "People" page on Jenkins web-interface, which before the attempted login only showed <code>admin</code>, but after the attempted login shows:</p>
  
  <p><a href="https://i.stack.imgur.com/I6rcs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I6rcs.png" alt="enter image description here"></a></p>
  
  <p>From what I've been able to figure out, there may be a problem with encoding in the login request from JJB, but I'm looking for help when it comes to how to go about trying to fix this.</p>
  
  <h3>Current setup:</h3>
  
  <pre><code>Ubuntu 16.04.4 LTS
  Jenkins 2.125 (working as expected, at :8080)
  jenkins-job-builder 2.0.9 
  Python 3.5.2
  pip 10.0.1 from /usr/local/lib/python3.5/dist-packages/pip-10.0.1-py3.5.egg/pip (python 3.5)
  java -version: openjdk version "1.8.0_171"
  </code></pre>