added window unload handler to remove user from user list and users object, removed duplicate variables, implemented posting of messages to chat space