fix gjslint errors in js/fxa.js
Add additional states to main panel, refactor JS.