Add comments.
Clear code.
Refactor connect, register and login flow.
Merge branch 'release/v0.1'