Refactor login logic to the login widget.

**DO NOT MERGE**

A little work needs to be done yet.
this should need a comment about the format that's eventually expected (foo@provider).
Maybe change it so the variable is more descriptive (full foo)