var dataForm = new VarienForm('login-form', true);
if (!dataForm.validator.validate()){
return;
}
jQuery.post(
'<?php echo $this->getUrl("mglogin/index/loginpost") ?>',
jQuery("#login-form").serialize(),
function(data){
var result = eval("(" + data + ")");
if (result.logined){
// Login succeeded.
}else{
// Login failed.
}
});