Fixed settings window call and minor code refactoring.
Fixed function call.
Minor refactor.
Demoted login to secondary window and revamped part of the login flow.
Code format.
Remove unnecessary cast.
Merge pull request #25 from Zetsaika/master

Login flow plus minor updates.