refactor LoginWindow
refactor DebugWindow
some sundry stuff, remove func