Decouple UI from localhost

The UI is currently hard coded to localhost:7261 in several places. This
makes it impossible to run scripted on any other host or port. Using
host-relative URLs will maintain the same origin as the original request.

This is a first step towards being able to run scripted on a remote
server.