urlencoding of query-string values

* fixes issue with usernames containing a blank space
* valid for x-server and restful api calls