Same dialogue box as the above poster mentioned, but do you see the 'Advanced' button at the bottom? You may need to click the padlock to activate it.
Open that, and uncheck the 'log out after 60 minutes inactivity' option.
I finally found out where that log out after 60 minutes of inactivity is on Lion.....there is an Advanced button on the Security and Privacy pane, and if you click that, you will see that danged option.....(if only I were running Lion, I would have been able to tell you that last time....) Oh well, hopefully this will solve your problem!!!