added code to register nick and user