Added test-logged-in script.

Certain cron jobs only need to run when a user is logged on.