Bug fix in api with HTTPSessionAuth and Python3+.