<commit_before>function MainCtrl($scope,$http,$state){

	$scope.loggedIn = function(){

		$http.get("backend/angular.php?type=php&include=Users&function=loggedIn").success(function(data){

			if (data.loggedin == true && data.data)
				$scope.user = data.data;
			else if(typeof $scope.user !== "undefined"){
				delete $scope.user;
				$state.go("home");
			}

		});

	};

	$scope.$on("loggedIn", function(){

		$scope.loggedIn();

	});

	setInterval(function() {
		$scope.loggedIn();
	}, 20000);

	$scope.loggedIn();

}

function LoginCtrl($scope,$http, $state, toaster){

	$scope.form = {};

	$scope.login = function(valid){

		if (!valid)
			return false;

		$http.post("backend/angular.php?type=php&include=Login&function=login", $scope.form).success(function(data){

			if (data.errors)
				toaster.pop({ type: 'error', title: "Error!", body: data.errors});
			else{
				$scope.$emit("loggedIn");
				$state.go("myAccount.dashboard");
			}

		});

	};

}<commit_msg>From 2000 > 20.000 reload<commit_after>function MainCtrl($scope,$http,$state){

	$scope.loggedIn = function(){

		$http.get("backend/angular.php?type=php&include=Users&function=loggedIn").success(function(data){

			if (data.loggedin == true && data.data)
				$scope.user = data.data;
			else if(typeof $scope.user !== "undefined"){
				delete $scope.user;
				$state.go("home");
			}

		});

	};

	$scope.$on("loggedIn", function(){

		$scope.loggedIn();

	});

	setInterval(function() {
		$scope.loggedIn();
	}, 200000);

	$scope.loggedIn();

}

function LoginCtrl($scope,$http, $state, toaster){

	$scope.form = {};

	$scope.login = function(valid){

		if (!valid)
			return false;

		$http.post("backend/angular.php?type=php&include=Login&function=login", $scope.form).success(function(data){

			if (data.errors)
				toaster.pop({ type: 'error', title: "Error!", body: data.errors});
			else{
				$scope.$emit("loggedIn");
				$state.go("myAccount.dashboard");
			}

		});

	};

}
{'fraction_non_alphanumeric': 0.20848237097598366, 'fraction_numerical': 0.010219724067450179, 'mean_word_length': 4.1798941798941796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1964061', 'n_tokens_mistral': 823, 'n_tokens_neox': 691, 'n_words': 103}