Redirecting after login for specific roles
Some things to look at:

'query' itself needs to be an array, not a string, eg...

array('id_rub' =&gt; '14', 'lg' =&gt; $language-&gt;language)  


and if you want to call header() directly, you need some more parameters:

header('Location: ' . $url, TRUE, $http_response_code);
drupal_exit($url);


(and an exit for good measure...btw, that's all drupal_goto() is really doing anyway)