   $scope.confirm = (message, title) ->
     deferred = $q.defer()
 
-    if $rootScope.loggedInUser.isMobile
+    if $scope.loggedInUser.isMobile
       if confirm message
         deferred.resolve()
       else

    s? and s.trim().length > 0

pwguardApp.controller 'LoginCtrl', ['$scope',
                                    '$rootScope',
                                    'pwgAjax',
                                    'pwgFlash',
                                    LoginCtrl]

# Navigation bar controller
# ---------------------------------------------------------------------------

NavbarCtrl = ($scope, pwgAjax) ->
  $scope.logout = () ->
    # NOTE: See https://groups.google.com/forum/#!msg/angular/bsTbZ86WAY4/gdpKwc4f7ToJ
    #
