added $scope.loggedIn