Index: src/app/page.tsx
===================================================================
--- src/app/page.tsx	(revision 6b8332fe05a98c02de045986092bb67143456a18)
+++ src/app/page.tsx	(revision b67f274e88a37e13671a714acf2c630e077f8758)
@@ -11,9 +11,12 @@
 } from '@fortawesome/free-solid-svg-icons';
 import { useState } from 'react';
+import { login } from '@/lib/auth';
 
 export default function LoginPage() {
   const [showPassword, setShowPassword] = useState(false);
+  const [isSubmitting, setIsSubmitting] = useState(false);
+  const [errorMessage, setErrorMessage] = useState<string | null>(null);
   const [formData, setFormData] = useState({
-    username: '',
+    email: '',
     password: ''
   });
@@ -27,8 +30,16 @@
   };
 
-  const handleSubmit = (e: React.FormEvent) => {
+  const handleSubmit = async (e: React.FormEvent) => {
     e.preventDefault();
-    // Handle login logic here
-    console.log('Login attempt:', formData);
+    setErrorMessage(null);
+    setIsSubmitting(true);
+    try {
+      await login({ email: formData.email, password: formData.password });
+      window.location.href = '/students/profile';
+    } catch (err) {
+      setErrorMessage(err instanceof Error ? err.message : 'Login failed.');
+    } finally {
+      setIsSubmitting(false);
+    }
   };
 
@@ -57,8 +68,8 @@
             <div className="p-8">
               <form onSubmit={handleSubmit} className="space-y-6">
-                {/* Username Field */}
+                {/* Email Field */}
                 <div>
-                  <label htmlFor="username" className="block text-sm font-medium text-gray-700 mb-2">
-                    Корисничко име
+                  <label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-2">
+                    Внесете е-пошта
                   </label>
                   <div className="relative">
@@ -67,12 +78,12 @@
                     </div>
                     <input
-                      id="username"
-                      name="username"
-                      type="text"
+                      id="email"
+                      name="email"
+                      type="email"
                       required
-                      value={formData.username}
+                      value={formData.email}
                       onChange={handleInputChange}
                       className="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary transition-colors"
-                      placeholder="Внесете корисничко име"
+                      placeholder="Внесете е-пошта"
                     />
                   </div>
@@ -132,11 +143,18 @@
                 </div>
 
+                {errorMessage && (
+                  <div className="rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">
+                    {errorMessage}
+                  </div>
+                )}
+
                 {/* Submit Button */}
                 <button
                   type="submit"
-                  className="w-full bg-primary hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors duration-200 flex items-center justify-center gap-2 shadow-lg hover:shadow-xl"
+                  disabled={isSubmitting}
+                  className="w-full bg-primary hover:bg-blue-700 disabled:opacity-60 disabled:hover:bg-primary text-white font-medium py-3 px-4 rounded-lg transition-colors duration-200 flex items-center justify-center gap-2 shadow-lg hover:shadow-xl"
                 >
                   <FontAwesomeIcon icon={faSignInAlt} className="h-4 w-4" />
-                  Најави се
+                  {isSubmitting ? 'Најави се...' : 'Најави се'}
                 </button>
               </form>
