Fix jasmine

Replaced the previous tests, the new functionality is fine except that it redirects after the embedded tests.

Fixed a critical problem when serving it from a different url.