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

    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",
      () ->
        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"
      )

  listMembers: () ->
    for member in @state.team["members"]

updatePassword = (e) ->
  data = {
    "current_password": $("#current-password").val(),
    "new_password": $("#new-password").val(),
    "new_password_confirmation": $("#new-password-confirmation").val()
  }
  apiCall "POST", "http://localhost:5000/api/v1/user/update_password", data, 'Authentication', 'UpdatePassword'
  .success (data) ->
    apiNotify {"status": 1, "message": "Your password has been successfully updated!"}, "/account"
  .error (jqXHR) ->
    apiNotify {"status": 0, "message": jqXHR.responseJSON.message}, "/account"

resetPassword = (e) ->
  e.preventDefault()
  data = {
    "reset_token": window.location.hash.substring(1)
    "new_password": $("#password-reset-form input[name=new-password]").val()
    "new_password_confirmation": $("#password-reset-form input[name=new-password-confirmation")
  }
  apiCall "POST", "http://localhost:5000/api/v1/user/confirm_password_reset", data, 'Authentication', 'ResetPassword'
  .done (data) ->
    ga('send', 'event', 'Authentication', 'ResetPassword', 'Success')
    apiNotify {"status": 1, "message": "Your password has been reset"}, "/"
  .error (jqXHR) ->
    apiNotify {"status": 0, "message": jqXHR.responseJSON.message}

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", () ->
    data = {
      "password": $("#disable-account-form input[name=current-password]").val()
    }
    apiCall "POST", "http://localhost:5000/api/v1/user/disable_account", data, 'Authentication', 'DisableAccount'
    .success (data) ->
      apiNotify {"status": 1, "message": "Your password has been disabled"}, "/"
    .error (jqXHR) ->
      apiNotify {"status": 0, "message": jqXHR.responseJSON.message}

Input = ReactBootstrap.Input
Row = ReactBootstrap.Row
