<commit_before>'use strict';

angular.module('tutorialWebApp').controller('loginCtrl', function($scope, $http, $window, $location, DataService) {
    console.log("loginCtrl called");
    // page.setPage("Login","login-layout");
    $scope.loginIn = function() {
        console.log("in login() method " + $scope.email + $scope.pwd);
		if ($scope.loginForm.email.$invalid || $scope.loginForm.pwd.$invalid) {
			$scope.signInFormError = "Invalid Credentials";
		} else {
			var params = {
				email : $scope.email,
				password : <PASSWORD>
			};
			DataService.postData("/login", params).success(
				function(response) {
					// $window.sessionStorage.userid = response.userid;
					// $window.sessionStorage.email = response.email;
					// $window.sessionStorage.userName = response.name;
					// $window.sessionStorage.usertype = response.usertype;
					// $window.sessionStorage.userLastLogin = response.lastLogin;
					// $rootScope.userid = response.userid;
					$location.path('/home');
					// $rootScope.usertype = response.usertype;
					// $rootScope.email = response.email;
					// $rootScope.userName = response.name;
					// $rootScope.userLastLogin = response.lastLogin;
					// if($rootScope.usertype == 'usr'){<commit_msg>loginCtrl<commit_after>'use strict';

angular.module('tutorialWebApp').controller('loginCtrl', function($scope, $location, DataService) {
    console.log("loginCtrl called");
    // page.setPage("Login","login-layout");
    $scope.loginIn = function() {
        console.log("in login() method " + $scope.email + $scope.pwd);
		if ($scope.loginForm.email.$invalid || $scope.loginForm.pwd.$invalid) {
			$scope.signInFormError = "Invalid Credentials";
		} else {
			var params = {
				email : $scope.email,
				password : $<PASSWORD>
			};
			DataService.postData("/login", params).success(
				function(response) {
					// $window.sessionStorage.userid = response.userid;
					// $window.sessionStorage.email = response.email;
					// $window.sessionStorage.userName = response.name;
					// $window.sessionStorage.usertype = response.usertype;
					// $window.sessionStorage.userLastLogin = response.lastLogin;
					// $rootScope.userid = response.userid;
					$location.path('/home');
					// $rootScope.usertype = response.usertype;
					// $rootScope.email = response.email;
					// $rootScope.userName = response.name;
					// $rootScope.userLastLogin = response.lastLogin;
					// if($rootScope.usertype == 'usr'){
{'fraction_non_alphanumeric': 0.16564916564916565, 'fraction_numerical': 0.0, 'mean_word_length': 3.4448462929475587, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4402987', 'n_tokens_mistral': 893, 'n_tokens_neox': 743, 'n_words': 111}