-timeTracker.controller 'AccountCtrl', ($scope, $modal, Redmine, Account, Project, Ticket, Message, State, Resource) ->
+timeTracker.controller 'AccountCtrl', ($scope, $modal, Redmine, Account, Project, Ticket, Message, State, Resource, Analytics) ->
 
   ID_PASS = 'id_pass'
 

        if result
          $scope.isSaving = $scope.state.isAdding = false
          Message.toast Resource.string("msgAuthSuccess"), 3000
          loadProject msg.account
        else
          failAuthentication null

  failAuthentication = (msg) ->
    $scope.isSaving = false
    Message.toast Resource.string("msgAuthFail"), 3000
    Analytics.sendEvent 'internal', 'auth', 'fail'


  ###
