Hi vBritinUSA,
Given that it works fine when you manually run FlexEngine.exe -s, I suspect that the logoff script isn't configured correctly.
Can you share an export of the HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logoff key?