Functional login and main gui/controller