Updated nickname support to check for invalid characters in nickname.