fix bug 777361 - Keep querystring values when logging in and out

https://bugzilla.mozilla.org/show_bug.cgi?id=777361