Replaced setNick by useNick

Replaced the setNick('NewName') function by useNick('newName", function) to ensure that the received nick is only kept for the duration of the task it needs to do.