hack enough of the rest client to get authentication working