Prevent going back by using history.replaceState()