added single instance setting to avoid undesired logouts when app is in background