added supprot for wsgi/virtualenv, fixed templates to use baseurl