added total redirect counter and method of doubling back to avoid infinite loops when hitting back from a page that was previously redirected; resolves #1, fixes #2