<commit_before>(function () {
  angular.module('BetterMe')
    .controller('loginController', loginController);

  function loginController($location, UserService) {
    var vm = this;
    vm.login = login;

    function login(user) {
      UserService
        .login(user)
        .then(function (user) {
          if(user) {
            $location.url('/calendar');
          }
        }, function () {
          model.error = "Your email and password, don't appear to be in our systems, please make sure they are correct.";
        });
    }
  }
})();<commit_msg>add login validation<commit_after>(function () {
  angular.module('BetterMe')
    .controller('loginController', loginController);

  function loginController($location, UserService) {
    var vm = this;
    vm.login = login;

    function login(user) {
      UserService
        .login(user)
        .then(function (user) {
          if(user) {
            $location.url('/calendar');
          }
        }, function () {
          vm.error = "Your email and password, don't appear to be in our systems, please make sure they are correct.";
        });
    }
  }
})();
{'fraction_non_alphanumeric': 0.13403880070546736, 'fraction_numerical': 0.0, 'mean_word_length': 2.270893371757925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4150385', 'n_tokens_mistral': 315, 'n_tokens_neox': 306, 'n_words': 80}