sorted out the correct flow between login/application/main
the main now summons login, that summons application, that self destroys back to login on logout