fix main.js: data.username could be empty

`data.username` could be empty and some times it'is [here](http://socket.io/demos/chat/):
```js
Uncaught TypeError: Cannot read property 'length' of undefined 
```