Fixed segfault caused by wrong type of the global g_chat. Added code allowing a spectator to login to a public cast room even if she specifies a password.