Properly handle defer cancelling.

- Fix issues related to "Cancel login does not work".
- Move srpauth errback to mainwindow.
- Add signal for provider setup cancel.

[Closes #4869]
[Closes #4973]