main.js timeout state restart and dashboard layout

working on restart after js timeout from inactivity, tweaking layout,
deleting unnecessary variables