Cleanup code by using Dojo's `xhr`.
Make our LoginWindow code similar to Orion's.
#3481
Remove mail code; use Orion's APIs.

Lots of cleanup around the API changes.
Delete register and migration code, no longer needed.
#3481