wip. TODO: make app startup seamless, add login/logout links, arrange logic