     else
       newpass = @state.team_password
       newpass_confirm = @state.confirm_team_password
-      confirmDialog("This will change the password needed to join your team.", "Team Password Change Confirmation", "Confirm", "Cancel",
+      confirmDialog "This will change the password needed to join your team.", "Team Password Change Confirmation", "Confirm", "Cancel",
       () ->
-        apiCall "POST", "http://localhost:5000/api/v1/team/update_password", {"new-password": newpass, "new-password-confirmation": newpass_confirm}
-        .done (resp) ->
-          switch resp.status
-            when 0
-                apiNotify resp
-            when 1
-                apiNotify resp, "/account"
-      )
+        data = {"new_password": newpass, "new_password-confirmation": newpass_confirm}
+        apiCall "POST", "http://localhost:5000/api/v1/team/update_password", data
+        .success (data) ->
+          apiNotify {"status": 0, "message": "Your team password has been successfully updated!"}, "/account"
+        .error (jqXHR) ->
+          apiNotify {"status": 0, "message": jqXHR.responseJSON.message}
 
   listMembers: () ->
     for member in @state.team["members"]

updatePassword = (e) ->
  $.ajax
    url: "http://localhost:5000/api/v1/user/update_password"
    method: "POST"
    data: JSON.stringify ->
      "current_password": $("#current-password").val(),
      "new_password": $("#new-password").val(),
      "new_password_confirmation": $("#new-password-confirmation").val()
    contentType: "application/json"
    dataType: "json"
    error: (jqXHR, textStatus, errorThrown) ->
      errMsg = JSON.parse(jqXHR.responseText)['message']
			ga('send', 'event', 'Authentication', 'UpdatePassword', 'Failure::' + errMsg)
      # apiNotify {"status": 0, "message": errMsg}, "/account"
    success: (data, textStatus, jqXHR) ->
      console.log(data)
			ga('send', 'event', 'Authentication', 'UpdatePassword', 'Success')
      # apiNotify {"status": 1, "message": "Your password has been successfully updated!"}, "/account"

resetPassword = (e) ->
  e.preventDefault()
  form = $("#password-reset-form").serializeObject()
  form["reset-token"] = window.location.hash.substring(1)
  apiCall "POST", "http://localhost:5000/api/v1/user/confirm_password_reset", form
  .done (data) ->
    ga('send', 'event', 'Authentication', 'ResetPassword', 'Success')
    apiNotify data, "/"

disableAccount = (e) ->
  e.preventDefault()
  confirmDialog("This will disable your account, drop you from your team, and prevent you from playing!", "Disable Account Confirmation", "Disable Account", "Cancel",
  () ->
    form = $("#disable-account-form").serializeObject()
    apiCall "POST", "http://localhost:5000/api/v1/user/disable_account", form
    .done (data) ->
      ga('send', 'event', 'Authentication', 'DisableAccount', 'Success')
      apiNotify data, "/")

Input = ReactBootstrap.Input
Row = ReactBootstrap.Row

    team_password: ""

  componentWillMount: ->
    apiCall "GET", "http://localhost:5000/api/v1/user"
    .success ((data) ->
      @setState update @state,
        user: $set: data
    ).bind this

    apiCall "GET", "http://localhost:5000/api/v1/team"
    .success ((data) ->
      @setState update @state,
        team: $set: data
    ).bind this

  onTeamRegistration: (e) ->
