When Windows takes a long time to shutdown, it is usually the number of programs which must be stopped that cause the delay. Also some anti-virus programs can cause a significant delay.
If problem is caused by adware/spyware (which is common these days) startup should be slow as well. Scan for malware with a good anti-virus program and good adware/spyware removal software. Good, free options are:
AVG Anti-Virus at grisoft.com
Microsoft Anti-Spyware Beta at microsoft.com
Ad-Aware SE at download.com
Spybot S&D at download.com
If system is clean or problem persists after removing malware, try stopping all startup programs using msconfig. If problem then goes away, sequence desirable startup items back until problem is located. Anti-virus software would be first suspect.
User switching may be cured after malware removal. If that problem persists, post back with more info.
Dalton