Index: backend/controllers/apiController.js
===================================================================
--- backend/controllers/apiController.js	(revision b8cbf06de7c697d3bbcdeab664b2d7003d2dfb4e)
+++ backend/controllers/apiController.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
@@ -1,19 +1,20 @@
 const supabase = require('../supabaseClient');
-const User = require('../models/User');
+const Student = require('../models/Student');
 
-async function createUserInSupabase(userInstance) {
+async function createUserInSupabase(studentInstance) {
   const { data, error } = await supabase.from('users').insert([
     {
-      id: userInstance.id,
-      username: userInstance.username,
-      email: userInstance.email,
-      name: userInstance.name,
-      solved_problems: 0,
-      rank: 'Novice',
-      points: 0,
-      commentCounter: 3,
-      commentCheckCounter: 0,
-      postCounter: 3,
-      postCheckCounter: 0,
+      id: studentInstance.id,
+      username: studentInstance.username,
+      email: studentInstance.email,
+      name: studentInstance.name,
+      solved_problems: studentInstance.solvedProblems,
+      rank: studentInstance.rank,
+      points: studentInstance.points,
+      commentCounter: studentInstance.commentCounter,
+      commentCheckCounter: studentInstance.commentCheckCounter,
+      postCounter: studentInstance.postCounter,
+      postCheckCounter: studentInstance.postCheckCounter,
+      isModerator: studentInstance.isModerator,
     },
   ]);
@@ -25,7 +26,7 @@
     const { username, name, email, password } = req.body;
 
-    const userModel = new User({ username, email, name });
+    const studentModel = new Student({ username, email, name });
 
-    const validationErrors = userModel.validate();
+    const validationErrors = studentModel.validate();
 
     if (validationErrors) {
@@ -64,7 +65,7 @@
     }
 
-    userModel.id = data.user.id;
+    studentModel.id = data.user.id;
 
-    const { error: dbError } = await createUserInSupabase(userModel);
+    const { error: dbError } = await createUserInSupabase(studentModel);
     if (dbError) {
       console.error('Database insert error:', dbError);
@@ -78,5 +79,5 @@
       message: 'Registration successful',
       success: true,
-      user: userModel.toJSON(),
+      user: studentModel.toJSON(),
     });
   } catch (error) {
Index: backend/models/Moderator.js
===================================================================
--- backend/models/Moderator.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
+++ backend/models/Moderator.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
@@ -0,0 +1,10 @@
+const User = require('./User');
+
+class Moderator extends User {
+  constructor(data = {}) {
+    super(data);
+    this.isModerator = true;
+  }
+}
+
+module.exports = Moderator;
Index: backend/models/Student.js
===================================================================
--- backend/models/Student.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
+++ backend/models/Student.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
@@ -0,0 +1,17 @@
+const User = require('./User');
+
+class Student extends User {
+  constructor(data = {}) {
+    super(data);
+    this.solvedProblems = data.solvedProblems || 0;
+    this.rank = data.rank || 'Novice';
+    this.points = data.points || 0;
+    this.commentCounter = data.commentCounter || 3;
+    this.commentCheckCounter = data.commentCheckCounter || 0;
+    this.postCounter = data.postCounter || 3;
+    this.postCheckCounter = data.postCheckCounter || 0;
+    this.isModerator = false;
+  }
+}
+
+module.exports = Student;
Index: backend/scripts/deleteAllUsers.js
===================================================================
--- backend/scripts/deleteAllUsers.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
+++ backend/scripts/deleteAllUsers.js	(revision a7a0590456ca888b6babe76cd71138aef5fa35a4)
@@ -0,0 +1,43 @@
+const supabase = require('../supabaseClient');
+
+async function deleteAllUsers() {
+  // 1. Get all user IDs from the users table
+  const { data: users, error: fetchError } = await supabase
+    .from('users')
+    .select('id');
+  if (fetchError) {
+    console.error('Error fetching users:', fetchError);
+    return;
+  }
+
+  if (!users || users.length === 0) {
+    console.log('No users found.');
+    return;
+  }
+
+  // 2. Delete users from Supabase Auth
+  for (const user of users) {
+    const { error: authError } = await supabase.auth.admin.deleteUser(user.id);
+    if (authError) {
+      if (authError.status === 404 && authError.code === 'user_not_found') {
+        console.warn(`Auth user ${user.id} not found (already deleted).`);
+      } else {
+        console.error(`Error deleting auth user ${user.id}:`, authError);
+      }
+    } else {
+      console.log(`Deleted auth user ${user.id}`);
+    }
+  }
+  // 3. Delete all users from the users table
+  const { error: tableError } = await supabase
+    .from('users')
+    .delete()
+    .not('id', 'is', null);
+  if (tableError) {
+    console.error('Error deleting users from table:', tableError);
+  } else {
+    console.log('Deleted all users from users table.');
+  }
+}
+
+deleteAllUsers();
