input view working for back button and refresh

input view working for back button and refresh
modified: var atCorrectState = (game.stateID === 1);