Why do you need to collect all Contact objects first, when you can do:
code:
function OnEvent_ContactSignin(Email) {
var Contact = Messenger.MyContacts.GetContact(Email);
if(Contact.Status == STATUS_ONLINE /* Assume you have MsgPlus 4.23 or higher? */ ) {
[do what you want to here]
}
}
Try not to make things more complicated than necessary. Plus! Live scripting is already hard enough!