Rev proxy HTTP headers are received in lowercase
Fix login flow error propogation again

And here I thought promises were supposed to get rid of all this kind of
awful callback nesting.