input view working for back button and refresh

input view working for back button and refresh
55-57 can just be:
if (game && game.stateID !== 1) {