Code:
tell application "System Preferences" to activate
tell application "System Events"
tell process "System Preferences"
click button "MobileMe" of scroll area 1 of window "System Preferences"
click button "Sign In" of group 1 of window "MobileMe"
delay 5.0
keystroke return
end tell
end tell
tell application "System Preferences" to quit
This is a script to check if you can sign in via SysPrefs. Stick it in an automator loop if you like.