Ensure query strings are encoded.  Move the query-str function to util
Fix bug causing the category to be ignored when logging in with get parameters for a url