It doesn't exactly log you off, since all your programs and such are still running, but the option you want is in the screensaver settings. Just uncheck the box that says something about showing the welcome screen after the screensaver activates.
How can I stop Windows XP from automatically logging off after not using for some time? This seems to have started after I installed .net update

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic