Clean up page pushing

If page loading fails, always get back to map.
Also cleaned-up the page pushing code to be
less duplicated.