Yes, I think it's in the Security control panel. But I've found a couple of limitations. First, if it can't quit all your applications (because you've got unsaved documents, for example) it won't log out. Second, if you have multiple users logged in, it doesn't log out the users in the background - only the user controlling the screen.