Redirect to a specific page in ajax callback
I had the same problem. You should try this:

ctools_include('ajax'); 
ctools_add_js('ajax-responder');
$commands[] = ctools_ajax_command_redirect('login');
return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);