Improve our test helpers a bit.
Handle unexpected HTTP responses, now with tests.
Add friendly failed login handling.