diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index dca70cad1babf90a931d907dce3ec4b7c77fb692..71cbda1cff8511c4fcf97fa5729ff3fa621113b8 100644
--- a/themes/bootstrap3/js/lightbox.js
+++ b/themes/bootstrap3/js/lightbox.js
@@ -170,6 +170,7 @@ VuFind.register('lightbox', function() {
           } else {
             VuFind.lightbox.refreshOnClose = true;
           }
+          _currentUrl = _originalUrl; // Now that we're logged in, where were we?
         }
         _update(html);
       })