To clarify a bit you have 3 "run" events for scripts.
1. Startup, this is the point in de computer based policies, before the user can login (local system credentials)
2. Logon, commonly used, runs right after the user logs on (so runs on user credentials)
3. Logoff, when a user logs off, is run right after his settings are saved.

Startup and Logoff are handled by policies, logon by user AD property.