When spectating a battle, if one of the players forfeits (at least, if the player whose "side of the arena" you're watching from forfeits), a "Join Battle" button appears for the spectator (where it'd appear if you disconnected then reconnected again). It doesn't do anything, though. (We were a little disappointed that it didn't let me continue the battle with the disconnected player's team, although obviously that wouldn't work if they came back.) The button disappears after the winner is announced. Expected behaviour is for spectators to not be invited into the game.
EDIT: And here's another bug, shown in this replay:
http://pokemonshowdown.com/replay/randombattle3533839
Relevant excerpts (these weren't on consecutive turns):
The foe's Ampharos used Hidden Power!
It's super effective! Jumpluff's substitute faded!
The foe's Ampharos used Hidden Power!
It's super effective! Marowak lost 49% of its health!
The foe's Ampharos used Hidden Power!
Golduck lost 24% of its health!
There is no type that hits Jumpluff and Marowak super-effectively, but Golduck neutrally. So something's wrong either with the way that Hidden Power's type is calculated, or with the messages (I'm not sure whether it did half or normal damage to Golduck). My opponent said that Ampharos was using HP Ice, by the way, which would imply the problem was with Golduck. (Btw, something that might be relevant: Ampharos may well have selected a different move, it was forced to use Hidden Power by Encore.)
FURTHER EDIT: No, Illusion wasn't involved. (The #1 explanation for all weird type effectiveness issues!)