added connected event and emits for status update
rooms.js file added