Find a windows utility app that performs a logoff and call it using the <exec> task. (Logging off Windows requires making a Win32 API call, which is more easily done by a native utility than via Java.)
See if this helps: http://ss64.com/nt/shutdown.html