GH126: Refactor signin view code

Reviewed and approved. Please, merge into master.