Fixed login in Mac OS X Example : polling that wouldn't stop after closing window and self used instead of block-typeof trick.