Switch to PyJWT which is Python 3 compliant