Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/AppointmentController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/AppointmentController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/AppointmentController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -94,4 +94,5 @@
         try {
             Long userId = appointmentService.updateAppointment(term);
+            System.out.println(userId);
             return ResponseEntity.ok(userId.toString());
         } catch (Exception e) {
@@ -119,7 +120,7 @@
         try {
             appointmentService.deleteAppointmentByTerm(term);
-            return ResponseEntity.noContent().build();
+            return ResponseEntity.noContent().build(); // Returns 204 No Content on success
         } catch (IllegalArgumentException e) {
-            return ResponseEntity.notFound().build();
+            return ResponseEntity.notFound().build(); // Returns 404 Not Found if appointment doesn't exist
         }
     }
@@ -148,3 +149,4 @@
     }
 
+
 }
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -3,4 +3,5 @@
 import finki.it.terapijamkbackend.spring.dto.LoginResponse;
 import finki.it.terapijamkbackend.spring.entities.User;
+import finki.it.terapijamkbackend.spring.entities.UserRole;
 import finki.it.terapijamkbackend.spring.services.UserService;
 import jakarta.servlet.http.Cookie;
@@ -48,11 +49,6 @@
             Cookie usernameCookie = new Cookie("username", temp.getUsername());
             usernameCookie.setPath("/");
-            usernameCookie.setMaxAge(600);
+            usernameCookie.setMaxAge(60*5);
             response.addCookie(usernameCookie);
-
-            Cookie roleCookie = new Cookie("role", temp.getUserRole().toString());
-            roleCookie.setPath("/");
-            roleCookie.setMaxAge(600);
-            response.addCookie(roleCookie);
 
             return ResponseEntity.ok(loginResponse);
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/CouponController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/CouponController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/CouponController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -3,4 +3,5 @@
 import finki.it.terapijamkbackend.spring.services.CouponsService;
 import jakarta.persistence.EntityNotFoundException;
+import jakarta.transaction.Transactional;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -19,4 +20,5 @@
     @PutMapping("/createCoupon")
     public ResponseEntity<Coupon> updateCoupon(@RequestBody Coupon couponItem) {
+        System.out.println(couponItem);
         if (couponItem.getTitle() == null || couponItem.getCode() == null) {
             return ResponseEntity.badRequest().build();
@@ -51,14 +53,7 @@
         coupon.setCode(newCouponData.getCode());
         coupon.setDescription(newCouponData.getDescription());
-        couponService.save(coupon);
+        couponService.save(coupon); // Save the updated coupon
 
         return ResponseEntity.ok().build();
     }
-
-
-    @GetMapping("/getCouponNames")
-    public ResponseEntity<List<String>> getCouponNames() {
-        List<String> couponNames = couponService.getCouponNames();
-        return ResponseEntity.ok(couponNames);
-    }
 }
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,5 +1,7 @@
 package finki.it.terapijamkbackend.spring.controllers;
 
+import finki.it.terapijamkbackend.spring.entities.Coupon;
 import finki.it.terapijamkbackend.spring.entities.Event;
+import finki.it.terapijamkbackend.spring.services.AppointmentService;
 import finki.it.terapijamkbackend.spring.services.EventService;
 import jakarta.persistence.EntityNotFoundException;
@@ -21,4 +23,5 @@
     @PutMapping("/createEvent")
     public ResponseEntity<Event> updateEvent(@RequestBody Event eventItem) {
+        System.out.println(eventItem);
         if (eventItem.getTitle() == null || eventItem.getText() == null) {
             return ResponseEntity.badRequest().build();
@@ -54,5 +57,5 @@
         event.setText(newEventData.getText());
         event.setImgSrc(newEventData.getImgSrc());
-        eventService.saveEvent(event);
+        eventService.saveEvent(event); // Save the updated coupon
 
         return ResponseEntity.ok().build();
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/RequestController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/RequestController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/RequestController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -37,4 +37,5 @@
     @GetMapping("/listAll")
     public List<TermsResponse> getRequestsByUser(@RequestParam("username") String username) {
+        System.out.println(username);
         List<Request>terms=requestService.findRequestsByUsername(username);
         return terms.stream()
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/UserController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/UserController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/UserController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -45,4 +45,5 @@
             response = new HashMap<>();
             response.put("message", "User created successfully!");
+            System.out.println(response);
             return ResponseEntity.ok(response);
         } catch (Exception e) {
@@ -53,9 +54,9 @@
     @GetMapping("/editUser")
     public ResponseEntity<User> getUser(@RequestParam String username) {
-        User user = userService.getUserByUsername(username);
+        User user = userService.getUserByUsername(username); // Fetch user data from service
         if (user != null) {
-            return ResponseEntity.ok(user);
+            return ResponseEntity.ok(user); // Return user data as JSON
         } else {
-            return ResponseEntity.notFound().build();
+            return ResponseEntity.notFound().build(); // Handle user not found
         }
     }
@@ -75,9 +76,9 @@
             String oldUsername=getCookieValue(request, "username");
             User user = userService.updateUser(oldUsername, updatedUser);
-            return ResponseEntity.ok(user);
+            return ResponseEntity.ok(user); // Return the updated user in the response
         } catch (UserNotFoundException e) {
-            return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); // Return a 404 if user is not found
         } catch (Exception e) {
-            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build(); // Return a 500 for other errors
         }
     }
Index: src/main/java/finki/it/terapijamkbackend/spring/controllers/WebController.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/controllers/WebController.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/controllers/WebController.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,12 +1,10 @@
 package finki.it.terapijamkbackend.spring.controllers;
 
-import finki.it.terapijamkbackend.spring.services.UserService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 
-
 @Controller
 public class WebController {
+
     @GetMapping(path="/")
     public String index() {
@@ -53,8 +51,3 @@
         return "html/adminCoupons";
     }
-
-    @GetMapping(path="/userInfo.html")
-    public String userInfo() {
-        return "html/userInfo";
-    }
 }
Index: src/main/java/finki/it/terapijamkbackend/spring/entities/Appointment.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/entities/Appointment.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/entities/Appointment.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -26,5 +26,5 @@
     private Long id;
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.LAZY)  // Fetch the related entity lazily to avoid loading all properties
     @JoinColumn(name="request_id", referencedColumnName = "id")
     @JsonIgnore
Index: src/main/java/finki/it/terapijamkbackend/spring/entities/Event.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/entities/Event.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/entities/Event.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -25,9 +25,7 @@
 
     private String title;
-    @Lob
-    @Column(name = "text", columnDefinition = "TEXT")
     private String text;
-    @Lob
-    @Column(name = "img_src", columnDefinition = "TEXT")
+    @Lob // Indicates that this field can hold large data
+    @Column(name = "img_src", columnDefinition = "TEXT") // Ensure column type is TEXT in database
     private String imgSrc;
 
Index: src/main/java/finki/it/terapijamkbackend/spring/services/CouponsService.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/services/CouponsService.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/services/CouponsService.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -9,5 +9,4 @@
 import java.util.List;
 import java.util.Optional;
-import java.util.stream.Collectors;
 
 @Service
@@ -34,9 +33,4 @@
         return couponRepository.findByTitle(identifier);
     }
-    public List<String> getCouponNames() {
-        return couponRepository.findAll().stream()
-                .map(Coupon::getCode)
-                .collect(Collectors.toList());
-    }
 
     public void save(Coupon coupon) {
Index: src/main/java/finki/it/terapijamkbackend/spring/services/EventService.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/services/EventService.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/services/EventService.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -1,6 +1,8 @@
 package finki.it.terapijamkbackend.spring.services;
 
+import finki.it.terapijamkbackend.spring.entities.Coupon;
 import finki.it.terapijamkbackend.spring.entities.Event;
 import finki.it.terapijamkbackend.spring.repositories.EventRepository;
+import finki.it.terapijamkbackend.spring.repositories.UserRepository;
 import jakarta.persistence.EntityNotFoundException;
 import org.springframework.beans.factory.annotation.Autowired;
Index: src/main/java/finki/it/terapijamkbackend/spring/services/RequestService.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/services/RequestService.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/services/RequestService.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -41,4 +41,5 @@
     public List<Request> findRequestsByUsername(String username) {
        User user=userRepository.findByUsername(username).orElse(null);
+        System.out.println(user.getId());
         return requestRepository.findRequestsForFreeAppointments(user.getId());
     }
Index: src/main/java/finki/it/terapijamkbackend/spring/services/UserService.java
===================================================================
--- src/main/java/finki/it/terapijamkbackend/spring/services/UserService.java	(revision 43c909087ac1cb1edc0060980e76744ba06a74bf)
+++ src/main/java/finki/it/terapijamkbackend/spring/services/UserService.java	(revision 743de552547f72aa36d0ace8c6df4c212d5bb86d)
@@ -58,5 +58,5 @@
             }
 
-            return userRepository.save(existingUser);
+            return userRepository.save(existingUser); // Save the updated user back to the database
         } else {
             throw new UserNotFoundException("User not found with username: " + username);
