Gpii 1029

http://issues.gpii.net/browse/GPII-1029
you seem to be constructing this and other urls multiple times. we should have config, or a function for this. You could also make use of fluid.stringTemplate so you can have a template url like `"var url = %base%path%resource" and the call `fluid.stringTemplate(url, {base: settings.url, path: "preferences/", resource: session.options.loggedUser});