As session switch can't launch browser and sessionending does nothing in window service mode, moved the events handler to run only in interactive mode