fix main.js: data.username could be empty