     submitData.user.email = @.$('#session_email').val()
     submitData.user.password = @.$('#session_password').val()
     submitData.user.confirm_registration = true
-    
+
     $.ajax
       type: 'PUT'
       url: "/v1/users/#{session.get('user').id}.json"

        @hide(logout: false, callback: true)
      error: (response) =>
        resp = $.parseJSON(response.responseText)
          
        switch resp.status
          when 401
            @.$('.input-group').tooltip(
              placement: 'top'
              trigger: 'manual'
              animation: false
              title: resp.flash.title + " " + resp.flash.message
            ).tooltip('show')
          when 403
            @logoutUser()
              
  submitComplete: ->
    submitData = {}
    submitData.user = {}

        @hide(logout: false, callback: true)
      error: (response) =>
        resp = $.parseJSON(response.responseText)

        switch resp.status
          when 422
            @showTooltip(@buildErrors(resp.errors),true)
          when 403
            @logoutUser()
          # when 500
          #   # do stuff

  showTooltip: (message,html) =>
    @.$('.input-group').tooltip(
      placement: ->
        $(@.$tip).addClass('session-tooltip')
        'top'
      trigger: 'manual'
      animation: false
      html: html
      title: message
    ).tooltip('show')

  hideTooltip: => @.$('.input-group').tooltip('hide')


