Refactor login logic to the login widget.

**DO NOT MERGE**

A little work needs to be done yet.
> the object seems ok, but why do you need a sync interface?
> afaik we do async in the frontend too. you just need a proxy object where to pass callbacks.
> have in mind that, when the porting is done, there will pure async in the backend, and no more ops in the frontend.

Well, I got confused for the idea of having an helper object that holds the states. Since moving them to the backend would mean to remove that object, we will ask to the backend for the states and connect to the resulting signals. In that scenario, a `LoginState` object would be useful if we wanted to have a sync api instead of the async one, otherwise it won't make sense to have it around.
Am I missing something here?

> in case it wasn't clear, I was just suggesting hiding state behind a single object on this take, not tackling the move to backend yet, it might make sense to do that when similar pullreqs are merged for the rest of the mess stuff

Yes, I got that it would be just that in this step.