added localStorage to keep the page you were just on