Don't append '?' without query parameters

When an URL without query parameters is opened, users end up with a "?" added to the end of said URL.

       http://example.org/whatever
    => http://example.com/cas/login?service=http%3A%2F%2Fexample.org%2Fwhatever
    => http://example.org/whatever?ticket=ST-0123456789ABCDEFGHIJKLMNOPQRS
    => http://example.org/whatever? <<< don't like this

This PR removes this unnecessary question mark. :smile: