title: JURI::getInstance() query missing
body: <p>I want to have a little login link on a Joomla page. If I click on this link and login, it should return me to the page I was before. For that I need the query of the current page like <code>option=com_component&amp;article=....</code> But If I use <code>JURI::getInstance()</code> the query is empty (false).</p>
  
  <p>This is the code: </p>
  
  <pre><code>&lt;?php
  $user = &amp; JFactory::getUser();
  $site = &amp; JURI::getInstance()-&gt;getQuery();
  $return = urlencode(base64_encode('index.php?'.$site));
  ?&gt;
  &lt;a class="&lt;?php echo $user-&gt;id? 'logout-a' : 'login-a';?&gt;" href="index.php?option=com_users&amp;amp;view=login&amp;amp;return=&lt;?php echo $return ?&gt;"&gt;
  &lt;?php
      if ($user-&gt;id) echo 'Logout';
      else echo 'Login';
  ?&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>The return works, but it only returns me to <code>index.php</code>, not to <code>index.php?option=...</code></p>