made podlogin 4-state instead of 2-state, and put hooks in for popup.

It's still ugly, though.