Mac OS lets you auto log in and set startup items – a nice saving of five minutes every morning… but then your Mac will be logged in and open for all to use until you get to it.

To keep the time saving and add some security just create a file from the below and save it as com.luomat.loginhook.plist into ~/Library/LaunchAgents/

(Found at engadget)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
 <dict>
  <key>AbandonProcessGroup</key>
  <true/>
  <key>Label</key>
  <string>com.luomat.loginhook</string>
  <key>ProgramArguments</key>
  <array>
     <string>/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession</string>
     <string>-suspend</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
 </dict>
</plist>