After looking over your script you will want to use OnEvent_SigninReady not OnEvent_Signin. The reason for this is while OnEvent_SignIn is being called it is still in the process of downloading the contact list and (although you don't neccessarily need it) not all the objects will be populated.
And your inArray function can be made to run quicker using a reverse while loop. Ex:
Javascript code:
function inArray(arr, ele){
var i = arr.length;
while (--i) {
if(arr[i] === ele) return true;
}
return false;
}
Overall way to go!