Post the code so we can see where you are going wrong.
It is likely that you are using Messenger.MyUserId when it is not initialized therefore causing errors.
To combat issues with such events occuring this is what I do:
js code:
function OnEvent_Initialize ( ) {
if ( Messenger.MyStatus < STATUS_INVISIBILE ) return false;
/*
Do stuff here like read the registry etc.
If we make it past the first line in this function than the user
we know is signed in.
*/
}
function OnEvent_SigninReady ( sEmail ) {
OnEvent_Initialize ( );
}