Help with switching to login screen on startup

I run SecuritySpy on my computer. I am attempting to make it so if there is a power falure my mac does restart and reopen securityspy but I want the computer to go back to the login screen immeadiatly after log in, for security reasons.

I don’t have much scripting experiance, so any help would be great.

Thanks Pierre

Model: iMac G5 1.8 20" 2GB DDR
AppleScript: ?
Browser: Safari 412.5
Operating System: Mac OS X (10.4)

Try this to go to the login screen:

do shell script "'/System/Library/CoreServices/Menu Extras/' -suspend"

PERFECT! Thank you so much!