Fixes to the controllers in NuGet and Sample.

Code cleanup, additional documentation, throw an exception on null
externalIdentity.
IE11 compatibility fixes

- Fixes for how javascript is handled in an href.
- Fixes for lack of window.location.origin support.