<commit_before>'use strict';

angular.module('sammui.apiAuthControllers', ['ngRoute'])

    .controller('oAuthLogin', ['$scope', 'oAuth',
        function ($scope, oAuth) {
            $scope.login = function () {
                var loginResult = oAuth.beAuthenticated({username: $scope.username, password: $scope.password});

                loginResult.then(function (success) {
                    $scope.loginSuccess = success;
                }, function (error) {
                    $scope.loginError = error;
                });

                loginResult.finally(function () {
                    $scope.oauthLoginForm.$submitted = false;
                });
            };

            $scope.logout = function () {
                oAuth.logout();
            };
        }
    ]);<commit_msg>Login error persistent message fix<commit_after>'use strict';

angular.module('sammui.apiAuthControllers', ['ngRoute'])

    .controller('oAuthLogin', ['$scope', 'oAuth',
        function ($scope, oAuth) {
            $scope.login = function () {
                var loginResult = oAuth.beAuthenticated({username: $scope.username, password: $scope.password});

                loginResult.then(function (success) {
                    $scope.loginSuccess = success;
                }, function (error) {
                    $scope.loginError = error;
                });

                loginResult.finally(function () {
                    $scope.oauthLoginForm.$submitted = false;
                });
            };

            $scope.logout = function () {
                oAuth.logout();
                $scope.loginSuccess = null;
                $scope.loginError = null;
            };
        }
    ]);
{'fraction_non_alphanumeric': 0.13046010483401282, 'fraction_numerical': 0.0, 'mean_word_length': 1.5301914580265095, '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': '5110831', 'n_tokens_mistral': 451, 'n_tokens_neox': 422, 'n_words': 72}