Server side:
.... $_SESSION[\'accountId\'] = $accountId; $_SESSION[\'type\'] = $_POST[\'accountType\']; echo \'1\'; return;
It might be a good idea to specify a URL option:
$.ajax( { url:'foo.php', type:'POST', ...