fsm for stratup and logoff