title: Unexpected end of input jQuery json
body: <p>I am trying to make a ajax account submission form, but once the user pressed sign up, and they made a mistake, they can't click sign up again because I get an "Unexpected end of input"</p>
  
  <pre><code>$.ajax({
          url: url,
          type: type,
          data: data,
          success: function(response) {
              console.log(response);
              var obj = $.parseJSON(response);
              console.log(obj);
              if (obj.status == 'success') {
                  console.log("successfull login");
              } else {
                  $("#register-form .response").html(obj.errors[0]);
                  $("#register-form .response").slideDown(500);
              }
          }
      });
  </code></pre>
  
  <p>it says the error happens on <code>console.log(response);</code>, but not on the first try, only after that.</p>
  
  <p>Hope you can help</p>