Added MainCtrl for global state
Basic login/logout