Generate a new nickname when it is in use or erroneous and check the

provided nickname for validity. This fixes a lockup with used or erroneous nicknames.