Fix missing import and bad IE link
Correct the handling of redirect uris after registration

Earlier code was producing bogus uris.
House cleaning for best tests (eventually) and modern idioms