         userId: msg.user.id
       Account.addAccount account, (result) ->
         if result
+          $scope.isSaving = $scope.state.isAdding = false
           Message.toast Resource.string("msgAuthSuccess"), 3000
           loadProject account
         else

   add account.
  ###
  addAccount = (msg) ->
    $scope.isSaving = $scope.isAdding = false
    if msg?.user?.id?
      account =
        url:    $scope.option.url

  ###
  failAuthentication = (msg) ->
    $scope.isSaving = false
    Message.toast Resource.string("msgAuthFail"), 3000


  ###
