FxA web flow (bug 1033694)

Suggest moving this to utils and adding a unit test.