sign out before resetting app
Use jQuery.param for generating query string