You could try adding...

Code:
$null = WriteValue("HKCU\Control Panel\Desktop","AutoEndTasks","1",REG_SZ)



to the beginning of your login script. This doesnt help with the 'detecting logoff' problem, but i believe it should get rid of the prompt asking to end the process.