add firstLoad handling so app maintains state when navigated away from