title: Login POST request to REST API does not work
body: <p>I am making a post request from the client to the API endpoint. On successful login, API returns a JWT token. </p>
  
  <p>The API perfectly works when sending the request on Postman as illustrated on the picture below:</p>
  
  <p><a href="https://i.stack.imgur.com/xXwLb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xXwLb.png" alt="postman request"></a></p>
  
  <p>However, when I try to make this request from the client, using AJAX request in order to save the JWT in the local storage on the client, the request does not even appear in the log. So, I assume that something is wrong with my AJAX call. </p>
  
  <p>Here is the client code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $('#button1').click(function(e){
              e.preventDefault();
              $.ajax({
                  type: 'POST',
                  data: {email: "test1@reg.ru", password: "123"},
                  contentType: "application/x-www-form-urlencoded",
                  url: 'http://localhost:3000/api/login',
                  success : function(data){
                      localStorage.setItem('token', data.token);
                      alert('ok');
                  },
                  error: function(result) {
                      alert('error');
                  }
              });
          });
  
  &lt;/script&gt;
  
  &lt;button id="button1"&gt;Test API login&lt;/button&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>