Index: backend/auth_form/urls.py
===================================================================
--- backend/auth_form/urls.py	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ backend/auth_form/urls.py	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -4,4 +4,5 @@
 from .serializers import CustomTokenObtainPairSerializer
 from rest_framework_simplejwt.views import TokenRefreshView
+import os
 
 urlpatterns = [
@@ -12,7 +13,11 @@
     path('user/', UserDetailView.as_view(), name='user_detail'),
     path('form/', StudentFormView.as_view(), name="student_form"),
-    path('google/login/', CustomGoogleLogin.as_view(), name='google_login'),
-    path('', include('dj_rest_auth.urls')),
-    path('registration/', include('dj_rest_auth.registration.urls')), 
-    path('google/', include('allauth.socialaccount.urls')), 
 ]
+
+if os.getenv("USE_OAUTH", "false").lower() == "true":
+    urlpatterns += [
+        path('google/login/', CustomGoogleLogin.as_view(), name='google_login'),
+        path('', include('dj_rest_auth.urls')),
+        path('registration/', include('dj_rest_auth.registration.urls')), 
+        path('google/', include('allauth.socialaccount.urls')),
+    ] 
Index: backend/backend/settings.py
===================================================================
--- backend/backend/settings.py	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ backend/backend/settings.py	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -1,17 +1,6 @@
-"""
-Django settings for backend project.
-
-Generated by 'django-admin startproject' using Django 5.1.7.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/5.1/topics/settings/
-
-For the full list of settings and their values, see
-https://docs.djangoproject.com/en/5.1/ref/settings/
-"""
-
 from datetime import timedelta
 from pathlib import Path
 from decouple import config
+import os
 
 # Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -179,17 +168,17 @@
 
 SITE_ID = 1
+if os.getenv("USE_OAUTH", "false").lower() == "true":
+    SOCIALACCOUNT_ADAPTER = "auth_form.adapters.CustomSocialAccountAdapter"
+    ACCOUNT_LOGIN_METHODS = {'email'}
+    ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*"]
 
-SOCIALACCOUNT_ADAPTER = "auth_form.adapters.CustomSocialAccountAdapter"
-ACCOUNT_LOGIN_METHODS = {'email'}
-ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*"]
-
-SOCIALACCOUNT_PROVIDERS = {
-    'google': {
-        'APP': {
-            'client_id': config('GOOGLE_CLIENT_ID'),
-            'secret': config('GOOGLE_CLIENT_SECRET'),
-            'key': ''
-        },
-        'SCOPE': ['profile', 'email'],
+    SOCIALACCOUNT_PROVIDERS = {
+        'google': {
+            'APP': {
+                'client_id': config('GOOGLE_CLIENT_ID'),
+                'secret': config('GOOGLE_CLIENT_SECRET'),
+                'key': ''
+            },
+            'SCOPE': ['profile', 'email'],
+        }
     }
-}
Index: docker-compose.yml
===================================================================
--- docker-compose.yml	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ docker-compose.yml	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -32,4 +32,5 @@
       - CHOKIDAR_USEPOLLING="true"
       - VITE_GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
+      - VITE_USE_OAUTH=${VITE_USE_OAUTH}
     depends_on:
       - backend
Index: frontend/src/context/AuthContext.tsx
===================================================================
--- frontend/src/context/AuthContext.tsx	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ frontend/src/context/AuthContext.tsx	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -18,8 +18,9 @@
 	sessionInitialized: boolean;
 	setUser: Dispatch<SetStateAction<User | null>>;
-	customGoogleLogin: (
+	customGoogleLogin?: (
 		overrideConfig?: OverridableTokenClientConfig | undefined
 	) => void;
 	googleLoginLoading: boolean;
+	useOAuth: boolean;
 }
 
Index: frontend/src/context/AuthProvider.tsx
===================================================================
--- frontend/src/context/AuthProvider.tsx	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ frontend/src/context/AuthProvider.tsx	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -14,4 +14,5 @@
 import { StudentData } from "../components/types";
 import AuthContext, { AuthContextType, User } from "../context/AuthContext";
+const useOAuth = import.meta.env.VITE_USE_OAUTH === "true";
 
 interface DecodedToken {
@@ -214,35 +215,37 @@
 	);
 
-	const customGoogleLogin = useGoogleLogin({
-		onSuccess: async (tokenResponse) => {
-			setGoogleLoginLoading(true);
-			const accessToken = tokenResponse.access_token;
-			try {
-				const response = await axios.post<{
-					access: string;
-					refresh: string;
-					full_name: string;
-					user_type: string;
-				}>("http://localhost:8000/auth/google/login/", {
-					access_token: accessToken,
-				});
-				const { access, refresh, full_name, user_type } = response.data;
-				await login(access, refresh, { full_name, user_type });
-				toast.success("Успешно сте најавени!");
-				window.dispatchEvent(new CustomEvent("googleLoginSuccess"));
-			} catch (err: any) {
-				console.error("Login failed:", err.response?.data || err.message);
-				toast.error("Грешка при најавување со Google");
-			} finally {
-				setGoogleLoginLoading(false);
-			}
-		},
-		onError: () => {
-			console.error("Login Failed");
-			setGoogleLoginLoading(false);
-			toast.error("Грешка при најавување со Google");
-		},
-		flow: "implicit",
-	});
+	const customGoogleLogin = useOAuth
+		? useGoogleLogin({
+				onSuccess: async (tokenResponse) => {
+					setGoogleLoginLoading(true);
+					const accessToken = tokenResponse.access_token;
+					try {
+						const response = await axios.post<{
+							access: string;
+							refresh: string;
+							full_name: string;
+							user_type: string;
+						}>("http://localhost:8000/auth/google/login/", {
+							access_token: accessToken,
+						});
+						const { access, refresh, full_name, user_type } = response.data;
+						await login(access, refresh, { full_name, user_type });
+						toast.success("Успешно сте најавени!");
+						window.dispatchEvent(new CustomEvent("googleLoginSuccess"));
+					} catch (err: any) {
+						console.error("Login failed:", err.response?.data || err.message);
+						toast.error("Грешка при најавување со Google");
+					} finally {
+						setGoogleLoginLoading(false);
+					}
+				},
+				onError: () => {
+					console.error("Login Failed");
+					setGoogleLoginLoading(false);
+					toast.error("Грешка при најавување со Google");
+				},
+				flow: "implicit",
+		  })
+		: undefined;
 
 	useEffect(() => {
@@ -270,4 +273,5 @@
 		customGoogleLogin,
 		googleLoginLoading,
+		useOAuth,
 	};
 
Index: frontend/src/main.tsx
===================================================================
--- frontend/src/main.tsx	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ frontend/src/main.tsx	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -9,7 +9,22 @@
 import "./index.css";
 
+const useOAuth = import.meta.env.VITE_USE_OAUTH === "true";
+
+const OAuthWrapper: React.FC<{ children: React.ReactNode }> = ({
+	children,
+}) => {
+	if (useOAuth) {
+		return (
+			<GoogleOAuthProvider clientId={import.meta.env.VITE_GOOGLE_CLIENT_ID}>
+				{children}
+			</GoogleOAuthProvider>
+		);
+	}
+	return <>{children}</>;
+};
+
 createRoot(document.getElementById("root")!).render(
 	<StrictMode>
-		<GoogleOAuthProvider clientId={import.meta.env.VITE_GOOGLE_CLIENT_ID}>
+		<OAuthWrapper>
 			<AuthProvider>
 				<SubjectsProvider>
@@ -21,5 +36,5 @@
 				</SubjectsProvider>
 			</AuthProvider>
-		</GoogleOAuthProvider>
+		</OAuthWrapper>
 	</StrictMode>
 );
Index: frontend/src/pages/Login.tsx
===================================================================
--- frontend/src/pages/Login.tsx	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ frontend/src/pages/Login.tsx	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -21,5 +21,5 @@
 	>({});
 	const navigate = useNavigate();
-	const { login, customGoogleLogin, googleLoginLoading } = useAuth();
+	const { login, customGoogleLogin, googleLoginLoading, useOAuth } = useAuth();
 	const [isLogging, setIsLogging] = useState(false);
 
@@ -132,26 +132,30 @@
 				</button>
 
-				<div className="mt-3 sm:mt-4 text-center">
-					<div className="relative">
-						<div className="absolute inset-0 flex items-center">
-							<div className="w-full border-t border-gray-300" />
+				{useOAuth && (
+					<>
+						<div className="mt-3 sm:mt-4 text-center">
+							<div className="relative">
+								<div className="absolute inset-0 flex items-center">
+									<div className="w-full border-t border-gray-300" />
+								</div>
+								<div className="relative flex justify-center text-sm">
+									<span className="px-2 bg-white text-gray-500">или</span>
+								</div>
+							</div>
 						</div>
-						<div className="relative flex justify-center text-sm">
-							<span className="px-2 bg-white text-gray-500">или</span>
-						</div>
-					</div>
-				</div>
 
-				<button
-					type="button"
-					onClick={() => customGoogleLogin()}
-					disabled={googleLoginLoading}
-					className={`w-full mt-3 sm:mt-4 bg-white border border-gray-300 text-gray-700 p-2 rounded hover:bg-gray-50 flex items-center justify-center gap-2 ${
-						googleLoginLoading ? "opacity-70 cursor-not-allowed" : ""
-					}`}
-				>
-					<img src={googleLogo} alt="Google logo" className="w-5 h-5" />
-					{googleLoginLoading ? "Се најавува..." : "Продолжи со Google"}
-				</button>
+						<button
+							type="button"
+							onClick={() => customGoogleLogin?.()}
+							disabled={googleLoginLoading}
+							className={`w-full mt-3 sm:mt-4 bg-white border border-gray-300 text-gray-700 p-2 rounded hover:bg-gray-50 flex items-center justify-center gap-2 ${
+								googleLoginLoading ? "opacity-70 cursor-not-allowed" : ""
+							}`}
+						>
+							<img src={googleLogo} alt="Google logo" className="w-5 h-5" />
+							{googleLoginLoading ? "Се најавува..." : "Продолжи со Google"}
+						</button>
+					</>
+				)}
 			</form>
 		</div>
Index: frontend/src/pages/Register.tsx
===================================================================
--- frontend/src/pages/Register.tsx	(revision 2df0abec99f7defe9005e18d19f6afddde172463)
+++ frontend/src/pages/Register.tsx	(revision de9612a2177507c9a6e8cfc9d172ebb47edae002)
@@ -29,6 +29,5 @@
 	>({});
 	const navigate = useNavigate();
-	const { login, customGoogleLogin, googleLoginLoading } = useAuth();
-
+	const { login, customGoogleLogin, googleLoginLoading, useOAuth } = useAuth();
 	const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
 		setFormData({
@@ -37,5 +36,4 @@
 		});
 	};
-
 	useEffect(() => {
 		const handleGoogleLoginSuccess = () => {
@@ -171,26 +169,29 @@
 					{loading ? "Се регистрира..." : "Регистрирај се"}
 				</button>
-				<div className="mt-3 sm:mt-4 text-center">
-					<div className="relative">
-						<div className="absolute inset-0 flex items-center">
-							<div className="w-full border-t border-gray-300" />
+				{useOAuth && (
+					<>
+						<div className="mt-3 sm:mt-4 text-center">
+							<div className="relative">
+								<div className="absolute inset-0 flex items-center">
+									<div className="w-full border-t border-gray-300" />
+								</div>
+								<div className="relative flex justify-center text-sm">
+									<span className="px-2 bg-white text-gray-500">или</span>
+								</div>
+							</div>
 						</div>
-						<div className="relative flex justify-center text-sm">
-							<span className="px-2 bg-white text-gray-500">или</span>
-						</div>
-					</div>
-				</div>
-
-				<button
-					type="button"
-					onClick={() => customGoogleLogin()}
-					disabled={googleLoginLoading}
-					className={`w-full mt-3 sm:mt-4 bg-white border border-gray-300 text-gray-700 p-2 rounded hover:bg-gray-50 flex items-center justify-center gap-2 ${
-						googleLoginLoading ? "opacity-70 cursor-not-allowed" : ""
-					}`}
-				>
-					<img src={googleLogo} alt="Google logo" className="w-5 h-5" />
-					{googleLoginLoading ? "Се најавува..." : "Продолжи со Google"}
-				</button>
+						<button
+							type="button"
+							onClick={() => customGoogleLogin && customGoogleLogin()}
+							disabled={googleLoginLoading}
+							className={`w-full mt-3 sm:mt-4 bg-white border border-gray-300 text-gray-700 p-2 rounded hover:bg-gray-50 flex items-center justify-center gap-2 ${
+								googleLoginLoading ? "opacity-70 cursor-not-allowed" : ""
+							}`}
+						>
+							<img src={googleLogo} alt="Google logo" className="w-5 h-5" />
+							{googleLoginLoading ? "Се најавува..." : "Продолжи со Google"}
+						</button>
+					</>
+				)}
 			</form>
 		</div>
