Use the history API to store which screen the user is using so that the back/forward buttons work as expected.