Fix logistration Jasmine tests

Includes several bug fixes caught during test writing, general clean-up, and adds js-url, a lightweight URL parser