added loggedin check on chatrooms