title: How to display the message of login account deleted(soft delete)
body: <p>I developed function to delete users (soft deletion), ie stays in the database and does not show in the list. When I enter the login and password of the deleted account, it have to show a message as <strong>this login is deleted</strong>.  </p>
  
  <p>how to achieve this and thanks</p>
  
  <p>user.controller.cs:</p>
  
  <pre><code>[Route("api/Users/Login")]
          [ResponseType(typeof(object))]
          public async Task&lt;object&gt; accountLogin(string name, string password)
          {
  
              string pwd = Encrypt(password);
              Users account = new Users();
  
              var query = from c in db.Users
                          where c.userlogin == name &amp;&amp; c.password == pwd
                          select c;
  
              account = query.FirstOrDefault();
  
              string message = "";
  
              if (account == null)
              {
                  message += "404";
              }
              else if (account .IsActive == 1)
              {
                  message += "400";
              }
              else if ((account .IsActive != 0) &amp;&amp; (account .IsActive != 1)) // this condition of account deleted -- or account .IsActive == 2
              {
                  message += "500";
              }
  
              else
              {
                  message = JsonConvert.SerializeObject(account);
              }
  
              return new { a = message };
  
          }
  </code></pre>
  
  <p>and this login.controller.js: </p>
  
  <pre><code>$scope.login = function () {
                  $scope.loading = true;
                  authService.login($scope.userlogin)
                      .then(function done(response) {
                              console.log(response);
                              if (response.a == '400') {
                                  $scope.error = 'account disabled';
                                  $scope.loading = false;
                              }
                              else if (response.a == '500') {
                                  $scope.error = 'this login is deleted';
                                  $scope.loading = false;
                              }
                              else if (response != '404') {
                                  console.log("bbb");
                                  $location.url('Dashboard');
                              }
                              else {
                                  console.log("login or password incorrect");
                                  $scope.error = 'login or password incorrect';
                                  $scope.loading = false;
                              }
                          },
                          function fail(err) {
                              $scope.error = 'Problem in connextion ! contact administrateur';
                              console.log(err);
                          }
                      );
              }
  </code></pre>