add a try/catch block and a loop to handle the case when the nickname
used to join the MUC is already taken.