     apiCall "GET", "/api/team/settings"
     .done ((req) ->
       @setState update @state,
-        settings: $set: req.data
+        settings: $merge: req.data
+     ).bind this
+     
+    apiCall "GET", "/api/user/status"
+    .done ((req) ->
+      @setState update @state,
+        settings: $merge: req.data
      ).bind this
 
   onRegistration: (e) ->

      apiNotify resp
      switch resp.status
        when 1
          if @state.settings.max_team_size > 1
            @setPage "Team Management"
          else
            document.location.href = "/profile"
    ).bind this

  onPasswordReset: (e) ->

  onLogin: (e) ->
    e.preventDefault()
    apiCall "POST", "/api/user/login", {username: @state.username, password: @state.password}
    .done ((resp) ->
      switch resp.status
        when 0
            apiNotify resp
        when 1
          if document.location.hash == "#team-builder"
            @setPage "Team Management"
          else
            if resp.data.teacher
              document.location.href = "/classroom"
            else
              document.location.href = "/profile"
    ).bind this

  setPage: (page) ->
    @setState update @state,
