<commit_before>var app = angular.module('mainApp', ['ngRoute']);

app.config(function($routeProvider) {
    $routeProvider
        .when('/', {
            templateUrl: '/partial/login.html'
        })
        .when('/', {
            resolve: {
                "check": function ($location, $rootScope) {
                    if(!$rootScope.loggedIn) {
                        $location.path('/');
                    } else {

                    }
                }
            },
            templateUrl: 'userIndex.html'
        })
        .otherwise({
            redirectTo: '/'
        });
});

app.controller('loginCtrl', function ($scope, $location, $rootScope) {
    $scope.submit = function () {

        if($scope.username == 'student' && $scope.password == '<PASSWORD>') {
            $rootScope.loggedIn = true;
            $location.path('/userIndex');
        } else {
            alert('Wrong username or password');
        }
    };
});<commit_msg>login<commit_after>var app = angular.module('mainApp', ['ngRoute']);

app.config(function($routeProvider) {
    $routeProvider
        .when('/', {
            templateUrl: 'partials/login.html'
        })
        .when('/userIndex', {
            resolve: {
                "check": function ($location, $rootScope) {
                    if(!$rootScope.loggedIn) {
                        $location.path('userIndex.html');
                    } else {

                    }
                }
            },
            templateUrl: 'partials/userMenu.html'
        })
        .otherwise({
            redirectTo: 'partial/login.html'
        });
});

app.controller('loginCtrl', function ($scope, $location, $rootScope) {
    $scope.submit = function () {

        if($scope.username == 'student' && $scope.password == '<PASSWORD>') {
            $rootScope.loggedIn = true;
            $location.path('userIndex');
        } else {
            alert('Wrong username or password');
        }
    };
});
{'fraction_non_alphanumeric': 0.15939086294416244, 'fraction_numerical': 0.0, 'mean_word_length': 1.5044472681067345, 'pattern_counts': {'":': 2, '<': 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': '1854414', 'n_tokens_mistral': 538, 'n_tokens_neox': 519, 'n_words': 83}