I don't know if this is of any interest, but I was having the same problems not being able to shut down WinXP. However I have now solved the problem.
I noticed that my log was giving me two errors that I did not have before installing avast! AV Free.
1. DCOM ERROR - GUID: {4991D34B-80A1-4291-83B6-3328366B9097} -
This event can occur when a large file is transferred from the Windows Update Server. A possible solution is to empty the contents of the "C:\Documents and Settings\All Users\Application Data\Microsoft\Network" folder.
Deleting this worked for me.
2. Event ID 7024 error. Background Intelligent Transfer Service (BITS) does not start
Run the fix: WindowsXP-KB969632-x86-ENU.exe
This also worked for me
I can now shut down normally (say about 5 seconds) without the system hanging on the login (logout?) screen
Maybe this will work for you. Although I am a qualified tech, I am not clever enough to know why it worked. Maybe avast! coders will understand.