Refactor login logic to the login widget.

**DO NOT MERGE**

A little work needs to be done yet.
It could be, we use this 'trick' in three places now.
We could have an utility method like `connect_and_track(self, store, signal, method)` but looks overcomplicated to me, we have less than 10 lines of code with all the connect/disconnect/list thing.
Any idea?