fix 404 errors due to trailing '/' in some urls

 - added a required content-type header for creating/updating images

Former commit msg:
-----------------
(UNNECESSARY) modified auth routine to return token id in short-form

  - on a vanilla devstack, `POST /tokens` for authentication returns a
  token object with a base64 encoded id
  - curling glance with the base64 token id returns a 404 status
    code(INCORRECT)
-----------------

Change-Id: Ic01fa23d3d5b0021b3c099da76ce82c0331fd5a1
Merge "fix 404 errors due to trailing '/' in some urls"