Make it work when running as a virtual application.

It would be best if the UI worked whether deployed at the root of a site, or in a virtual directory.