I had a same problem and I will try to give you more detailed explanation.
Craft thinks you submitted a classic login form and Users controller tries to redirect you after successful login. In case you send AJAX request Craft will return success:true. So, you should add dataType: "json" in your AJAX request and you will be logged in with response success:true.
All in all, your code should be:
$('#loginForm').on('submit', function(e) {
e.preventDefault();
var formData = $(this).serialize();
$.ajax({
url: '/',
contentType: "application/x-www-form-urlencoded",
dataType: "json",
type:'POST',
data: formData,
success: function(result) {
console.log(result);
}
});
});