<commit_before>(function () {
    "use strict";

    angular
        .module('VinculacionApp')
        .controller('LoginController', LoginController);

    LoginController.$inject = ['$rootScope', '$location', 'authentication', 'toaster'];

    function LoginController ($rootScope, $location, authentication, toaster) {
        var vm = this;

        vm.username = "";
        vm.password = "";
        vm.login = login;
        vm.loading = false;

        authentication.ClearCredentials();

        function login() {
            vm.loading = true;

            authentication.Login( vm.username, vm.password, LoginSuccess, LoginFail);
        }
        
        function LoginSuccess(response) {
            authentication.SetCredentials(response.data);
            $location.path('/home');
            window.localStorage['Session'] = JSON.parse(response.config.data).User;
            <commit_msg>Update session at login<commit_after>(function () {
    "use strict";

    angular
        .module('VinculacionApp')
        .controller('LoginController', LoginController);

    LoginController.$inject = ['$rootScope', '$location', 'authentication', 'toaster'];

    function LoginController ($rootScope, $location, authentication, toaster) {
        var vm = this;

        vm.username = "";
        vm.password = "";
        vm.login = login;
        vm.loading = false;

        authentication.ClearCredentials();

        function login() {
            vm.loading = true;

            authentication.Login( vm.username, vm.password, LoginSuccess, LoginFail);
        }
        
        function LoginSuccess(response) {
            authentication.SetCredentials(response.data);
            $location.path('/home');
            
            window.localStorage['Session'] = 
            $rootScope.Session =
            JSON.parse(response.config.data).User;

{'fraction_non_alphanumeric': 0.12573568753344033, 'fraction_numerical': 0.0, 'mean_word_length': 2.2409012131715773, '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': '367315', 'n_tokens_mistral': 468, 'n_tokens_neox': 462, 'n_words': 90}