diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js
index b59908137e..d5c4486ae2 100644
--- a/awx/ui/static/js/controllers/Authentication.js
+++ b/awx/ui/static/js/controllers/Authentication.js
@@ -13,13 +13,20 @@
function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, $location, Authorization, ToggleClass, Alert, Wait,
Timer, Empty) {
- var setLoginFocus, lastPath, sessionExpired,
+ var setLoginFocus, lastPath, sessionExpired, loginAgain,
e, html, scope = $rootScope.$new();
setLoginFocus = function () {
$('#login-username').focus();
};
+ loginAgain = function() {
+ Authorization.logout();
+ setTimeout(function() {
+ window.location = '/#/logout'; // if we get here, force user back to re-login
+ }, 500);
+ };
+
scope.sessionExpired = (Empty($rootScope.sessionExpired)) ? $cookieStore.get('sessionExpired') : $rootScope.sessionExpired;
scope.login_username = '';
scope.login_password = '';
@@ -53,8 +60,8 @@ function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope,
"" +
"\n" +
"