How to redirect according to URL parameter after form submission
The issue with ?destination= is that it provides no mechanism for setting external =&gt; TRUE for the options in drupal_goto(), which Drupal needs to redirect to an off-site location.

I think the easiest way to get what you're looking for is to implement hook_form_alter() for the user login form, save the URL parameter if it's available, and then manually redirect in the submit handler.

Something like this:

function MYMODULE_form_user_login_alter(&amp;$form, &amp;$form_state, $form_id) {
  if (isset($_GET['redir'])) {
    $form['redir'] = array(
      '#type' =&gt; 'value',
      '#value' =&gt; $_GET['redir']
    );

    $form['#submit'][] = 'MYMODULE_user_login_redirect';
  }
}

function MYMODULE_user_login_redirect(&amp;$form, &amp;$form_state) {
  $form_state['redirect'] = array($form_state['values']['redir'], array('external' =&gt; TRUE));
}