Added a global variable named 'nickname' to keep track of the nickname the user has registered.