Login with ajax
<?php
if ( function_exists('login_with_ajax') ) {
$bk_home_url = get_home_url();
$ajaxArgs = array(
'profile_link' => true,
'template' => 'modal',
'registration' => true,
'remember' => true,
'redirect' => $bk_home_url
);
login_with_ajax($ajaxArgs);
}?>