code: def POST_AUTH(self, courseid):  # pylint: disable=arguments-differ
          
          course, __ = self.get_course_and_check_rights(courseid, None, False)
          data = web.input()
          if "remove" in data:
              try:
                  if data["type"] == "all":
                      aggregations = list(self.database.aggregations.find({"courseid": courseid}))
                      for aggregation in aggregations:
                          aggregation["students"] = []
                          for group in aggregation["groups"]:
                              group["students"] = []
                          self.database.aggregations.replace_one({"_id": aggregation["_id"]}, aggregation)
                  else:
                      self.user_manager.course_unregister_user(course, data["username"])
              except:
                  pass
          elif "register" in data:
              try:
                  self.user_manager.course_register_user(course, data["username"].strip(), '', True)
              except:
                  pass
          return self.page(course)
docs: POST request