User name is displayed as 'undefined'