title: $.ajax + authentication + `@` in username
body: <p>I am creating a web app which uses jQuery to authenticate:</p>
  
  <pre><code>$.ajax({
      url: "/session/create?format=json",
      type: "GET",
      dataType: "json",
      cache: false,
      username: $("#signin-email").val(),
      password: $("#signin-password").val(),
      success: function(data) {
        if(data.success) {
          success = true;
        }
      }
    });
  </code></pre>
  
  <p>The problem is that the code <strong>only</strong> makes the AJAX-request when the <code>username</code> does not include things like an <code>@</code> (probably because the @ is a seperator for authentication and host in the URL), which is required in my app. Can anyone help me with how I can do this? I do not mind changing the back-end a little bit, but requiring users to have an <code>@</code>-less email is not an option.</p>
  
  <p>Oh, my back-end is a Ruby-on-Rails app.</p>