simple flag parsing for app mode
basic sessions