the queryuser.bat contains:

@query session %username%|findstr "rdp ica"|find /C " "

The logoff works now indeed...only there can still be CTRL+C. But if i get the sleep outta there they haven't got time to CTRL+C or BREAK.
The only thing then is that they don't get a message like you already been logged in somewhere else. How can i solve that then?