Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/BackendRenderApplication.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/BackendRenderApplication.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/BackendRenderApplication.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -3,4 +3,9 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
 
 @SpringBootApplication
@@ -11,3 +16,8 @@
 	}
 
+	@Bean
+	public PasswordEncoder passwordEncoder(){
+		return new BCryptPasswordEncoder(12);
+	}
+
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/config/OAuthConfig.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/config/OAuthConfig.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/config/OAuthConfig.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,29 @@
+package internettehnologii.imaps.backendRender.web.config;
+
+import lombok.Getter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Getter
+@Component
+public class OAuthConfig {
+    @Value("${github.client.id}")
+    private String GITHUB_CLIENT_ID;
+    @Value("${github.client.secret}")
+    private String GITHUB_CLIENT_SECRET;
+    @Value("${github.redirect.uri}")
+    private String GITHUB_REDIRECT_URI;
+    @Value("${google.redirect.uri}")
+    private String GOOGLE_REDIRECT_URI;
+    @Value("${google.client.id}")
+    private String GOOGLE_CLIENT_ID;
+    @Value("${google.client.secret}")
+    private String GOOGLE_CLIENT_SECRET;
+
+    private final String GITHUB_TOKEN_URL = "https://github.com/login/oauth/access_token";
+    private final String GITHUB_USER_URL = "https://api.github.com/user";
+
+    private final String GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
+    private final String GOOGLE_USER_URL = "https://www.googleapis.com/oauth2/v3/userinfo";
+
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AdminController.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AdminController.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AdminController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -4,6 +4,8 @@
 import internettehnologii.imaps.backendRender.web.service.interfaces.MapService;
 import internettehnologii.imaps.backendRender.web.service.interfaces.PublishRequestService;
+import internettehnologii.imaps.backendRender.web.service.interfaces.ReportService;
 import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
 import internettehnologii.imaps.backendRender.web.util.DTO.PublishMapDTO;
+import internettehnologii.imaps.backendRender.web.util.DTO.ReportDTO;
 import internettehnologii.imaps.backendRender.web.util.Util;
 import org.springframework.http.ResponseEntity;
@@ -23,8 +25,10 @@
     private final MapService mapService;
     private final PublishRequestService publishRequestService;
+    private final ReportService reportService;
 
-    public AdminController(MapService mapService, PublishRequestService publishRequestService) {
+    public AdminController(MapService mapService, PublishRequestService publishRequestService, ReportService reportService) {
         this.mapService = mapService;
         this.publishRequestService = publishRequestService;
+        this.reportService = reportService;
     }
 
@@ -32,5 +36,5 @@
     public ResponseEntity<List<MapDTO>> getPendingMapRequests() {
         try {
-            List<MapDTO> maps = Util.convertToMapDTO(mapService.findByStatus(MAP_STATUS.INVALID));
+            List<MapDTO> maps = Util.convertToMapDTO(mapService.findByStatus(MAP_STATUS.PENDING));
             return ResponseEntity.ok(maps);
         } catch (Exception e) {
@@ -71,7 +75,7 @@
     }
     @PostMapping("/pr/deny")
-    public ResponseEntity<Map<String,Object>> denyPR(@RequestParam("id") Integer id) {
+    public ResponseEntity<Map<String,Object>> denyPR(@RequestParam("id") Integer id,@RequestParam String reason) {
         try{
-            publishRequestService.denyPublishRequest(id);
+            publishRequestService.denyPublishRequest(id,reason);
         } catch (Exception e){
             e.printStackTrace();
@@ -79,3 +83,23 @@
         return ResponseEntity.ok(new HashMap<>());
     }
+    @GetMapping("/load-reports")
+    public ResponseEntity<List<ReportDTO>> getReports() {
+        try {
+            List<ReportDTO> reportDTOS = reportService.getReports()
+                    .stream()
+                    .map(report ->
+                new ReportDTO(
+                        report.getUser().getUsername(),
+                        report.getMap().getName(),
+                        report.getSubject(),
+                        report.getContent(),
+                        report.getCreatedAt().toString()
+                        )
+            ).toList();
+            return ResponseEntity.ok(reportDTOS);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ResponseEntity.badRequest().build();
+        }
+    }
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AuthController.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AuthController.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/AuthController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -23,5 +23,5 @@
 @RequestMapping("/api/auth")
 @RestController
-@CrossOrigin(origins = "http://localhost:5173/")
+//@CrossOrigin(origins = "http://localhost:5173")
 public class AuthController {
 
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/InvalidStateException.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/InvalidStateException.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/InvalidStateException.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+package internettehnologii.imaps.backendRender.web.controllers;
+
+public class InvalidStateException extends RuntimeException {
+  public InvalidStateException(String message) {
+    super(message);
+  }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapDrawController.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapDrawController.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapDrawController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -52,22 +52,23 @@
 
     @PostMapping("/publish/add")
-    public ResponseEntity<Map<String,Object>> sendPublishRequest(@RequestBody PublishMapDTO formData, @RequestParam String username) {
+    public ResponseEntity<MapDTO> sendPublishRequest(@RequestBody PublishMapDTO formData, @RequestParam String username) {
 
         System.out.println("FORM DATA: -------------------------------------------- " + formData);
-        try{
+        try {
             IMapsUser user = userService.getUser(username);
 
-            publishRequestService.addPublishRequest(formData,user);
-
-            return ResponseEntity.ok(new HashMap<>());
-
-        } catch (Exception e){
-            return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
-        }
-    }
+            MapDTO updatedMap = publishRequestService.addPublishRequest(formData, user);
+
+            return ResponseEntity.ok(updatedMap);
+
+        } catch (Exception e) {
+            return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
+        }
+    }
+
     @GetMapping("/publish/get")
     public ResponseEntity<PublishMapDTO> getPublishRequestForMap(@RequestParam String mapName) {
         PublishRequest pr = publishRequestService.getPublishRequestByMapName(mapName);
-        PublishMapDTO dto = new PublishMapDTO(pr.getId(),pr.getName(), pr.getLastName(), pr.getMap().getName(), pr.getMapType(), pr.getGMapsUrl());
+        PublishMapDTO dto = new PublishMapDTO(pr.getId(), pr.getName(), pr.getLastName(), pr.getMap().getName(), pr.getMapType(), pr.getGMapsUrl());
         return ResponseEntity.ok(dto);
     }
@@ -76,10 +77,10 @@
     public ResponseEntity<List<MapDTO>> getFavouriteMapsForUser(@RequestParam String username) {
 
-        try{
+        try {
             IMapsUser user = userService.getUser(username);
             List<MapDTO> mapDTOS = Util.convertToMapDTO(user.getFavoriteMaps());
             return ResponseEntity.ok().body(mapDTOS);
 
-        } catch (Exception e){
+        } catch (Exception e) {
             System.out.println(e.getMessage());
             return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
@@ -91,11 +92,6 @@
             (@RequestBody SaveMapDTO saveMapDTO, @RequestParam String username) {
 
-        System.out.println("MAP DTO: " + saveMapDTO);
-
-        try {
-
-            System.out.println("=================================");
-            System.out.println("MAPDTO: " + saveMapDTO);
-            System.out.println("USERNAME:" + username);
+
+        try {
             IndoorMap map = mapService.getMapForUser(username, saveMapDTO.getMapName());
             Floor f = floorService.getFloorByNum(saveMapDTO.getFloorNum(), map);
@@ -114,5 +110,5 @@
             System.out.println("UPDATED FLOOR " + f.getFloorNumber());
 
-            FloorDTO floorDTO = new FloorDTO(f.getFloorNumber(), saveMapDTO.getMapName(),f.getMapData().getShapeData());
+            FloorDTO floorDTO = new FloorDTO(f.getFloorNumber(), saveMapDTO.getMapName(), f.getMapData().getShapeData());
 
             return ResponseEntity.ok(floorDTO);
@@ -126,10 +122,10 @@
     @PutMapping("/my-maps/create")
     public ResponseEntity<MapDTO> createMap(@RequestBody CreateMapDTO mapData, @RequestParam String username) {
-        try{
-            mapService.createMap(mapData.getName(), mapData.getMapType() , username);
-            IndoorMap map = mapService.getMapForUser(username,mapData.getName());
+        try {
+            mapService.createMap(mapData.getName(), username);
+            IndoorMap map = mapService.getMapForUser(username, mapData.getName());
             MapDTO mapDTO = new MapDTO(map.getName(),
-                    map.getMapType()
-                    ,map.getCreatedAt(),
+                    map.getMapType(),
+                    map.getCreatedAt(),
                     map.getModifiedAt(),
                     map.getStatus().name(),
@@ -139,5 +135,4 @@
         } catch (Exception e) {
             System.out.println(e.getMessage());
-            e.printStackTrace();
             return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
         }
@@ -147,6 +142,6 @@
     @GetMapping("/my-maps/load")
     public ResponseEntity<List<FloorDTO>> loadPersonalMap(@RequestParam String mapName, @RequestParam String username) {
-        try{
-            IndoorMap map = mapService.getMapForUser(username,mapName);
+        try {
+            IndoorMap map = mapService.getMapForUser(username, mapName);
             List<Floor> floors = map.getFloors();
             return ResponseEntity.ok().body(Util.convertToFloorDTO(floors));
@@ -158,13 +153,13 @@
 
     @PostMapping("/room-types/add")
-    public ResponseEntity<Map<String,Object>> addRoomType(@RequestParam String roomTypeName,
-                                                          @RequestParam String username,
-                                                          @RequestParam String mapName) {
-        try {
-            IndoorMap map = mapService.getMapForUser(username,mapName);
-            roomTypeService.addRoomType(roomTypeName,map);
+    public ResponseEntity<Map<String, Object>> addRoomType(@RequestParam String roomTypeName,
+                                                           @RequestParam String username,
+                                                           @RequestParam String mapName) {
+        try {
+            IndoorMap map = mapService.getMapForUser(username, mapName);
+            roomTypeService.addRoomType(roomTypeName, map);
             return ResponseEntity.ok(new HashMap<>());
 
-        } catch (Exception e){
+        } catch (Exception e) {
             System.out.println(e.getMessage());
             return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
@@ -175,5 +170,5 @@
     public ResponseEntity<List<RoomTypeDTO>> getRoomTypesForMap(@RequestParam String mapName, @RequestParam String username) {
 
-        IndoorMap map = mapService.getMapForUser(username,mapName);
+        IndoorMap map = mapService.getMapForUser(username, mapName);
 
         List<RoomTypeDTO> roomTypeDTOS = map.getRoomTypes().stream().map(r -> new RoomTypeDTO(r.getName())).toList();
@@ -182,10 +177,10 @@
 
     @DeleteMapping("/floors/delete")
-    public ResponseEntity<Map<String,Object>> deleteFloor(@RequestParam String mapName,
-                                                          @RequestParam int floorNum) {
-        try{
-            floorService.deleteFloor(floorNum,mapName);
+    public ResponseEntity<Map<String, Object>> deleteFloor(@RequestParam String mapName,
+                                                           @RequestParam int floorNum) {
+        try {
+            floorService.deleteFloor(floorNum, mapName);
             return ResponseEntity.ok(new HashMap<>());
-        } catch (Exception e){
+        } catch (Exception e) {
             System.out.println(e.getMessage());
             return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
@@ -194,8 +189,8 @@
 
     @PutMapping("/floors/add")
-    public ResponseEntity<Map<String,Object>> addFloor(@RequestBody FloorDTO floorDTO) {
-        Map<String,Object> response = new HashMap<>();
-        try{
-            floorService.addFloor(floorDTO.getNum(),floorDTO.getMapName());
+    public ResponseEntity<Map<String, Object>> addFloor(@RequestBody FloorDTO floorDTO) {
+        Map<String, Object> response = new HashMap<>();
+        try {
+            floorService.addFloor(floorDTO.getNum(), floorDTO.getMapName());
             return ResponseEntity.ok(response);
         } catch (Exception e) {
@@ -226,4 +221,21 @@
 
 
+    @PostMapping("/my-maps/edit")
+    public ResponseEntity<MapDTO> updateMapInfo(@RequestBody EditMapDTO editMapDTO) {
+
+
+
+        try {
+
+            MapDTO mapDTO = mapService.updateMapInfo(editMapDTO);
+
+
+            return new ResponseEntity<>(mapDTO, HttpStatus.OK);
+
+        } catch (Exception e) {
+            return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
+        }
+
+    }
 
 
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapViewController.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapViewController.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/MapViewController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -6,12 +6,10 @@
 import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
 import internettehnologii.imaps.backendRender.web.entities.IndoorMap;
+import internettehnologii.imaps.backendRender.web.entities.Report;
 import internettehnologii.imaps.backendRender.web.exceptions.EmptyMapException;
-import internettehnologii.imaps.backendRender.web.exceptions.FloorNotFoundException;
-import internettehnologii.imaps.backendRender.web.service.interfaces.GraphService;
-import internettehnologii.imaps.backendRender.web.service.interfaces.FloorService;
-import internettehnologii.imaps.backendRender.web.service.interfaces.MapService;
-import internettehnologii.imaps.backendRender.web.service.interfaces.UserService;
+import internettehnologii.imaps.backendRender.web.service.interfaces.*;
 import internettehnologii.imaps.backendRender.web.util.DTO.FloorDTO;
 import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
+import internettehnologii.imaps.backendRender.web.util.DTO.ReportDTO;
 import internettehnologii.imaps.backendRender.web.util.DTO.RoomTypeDTO;
 import internettehnologii.imaps.backendRender.web.util.Util;
@@ -34,11 +32,13 @@
     private final GraphService graphService;
     private final UserService userService;
+    private final ReportService reportService;
 
     @Autowired
-    public MapViewController(MapService mapService, FloorService floorService, GraphService graphService, UserService userService) {
+    public MapViewController(MapService mapService, FloorService floorService, GraphService graphService, UserService userService, ReportService reportService) {
         this.mapService = mapService;
         this.floorService = floorService;
         this.graphService = graphService;
         this.userService = userService;
+        this.reportService = reportService;
     }
 
@@ -120,5 +120,5 @@
             IndoorMap map = mapService.getMapByName(mapName);
             IMapsUser user = userService.getUser(username);
-            userService.addToFavorites(user, map);
+            userService.addFavoriteMap(user, map);
             return ResponseEntity.ok(new HashMap<>());
         } catch (Exception e){
@@ -132,5 +132,5 @@
             IndoorMap map = mapService.getMapByName(mapName);
             IMapsUser user = userService.getUser(username);
-            userService.removeFromFavorites(user, map);
+            userService.removeFavoriteMap(user, map);
             return ResponseEntity.ok(new HashMap<>());
         } catch (Exception e){
@@ -139,5 +139,20 @@
         }
     }
+    @PostMapping("/protected/reports/create")
+    public ResponseEntity<Map<String, Object>> createReport(
+            @RequestBody ReportDTO reportBody) {
+        try {
+            IMapsUser user = userService.getUser(reportBody.getUsername());
+            IndoorMap map = mapService.getMapByName(reportBody.getMapName());
+            Report report = new Report(user, map, reportBody.getSubject(), reportBody.getContent());
+            reportService.saveReport(report);
 
+            Map<String, Object> response = new HashMap<>();
+            return ResponseEntity.ok(response);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ResponseEntity.status(404).body(new HashMap<>());
+        }
+    }
 
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/OAuthController.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/OAuthController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/controllers/OAuthController.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,141 @@
+package internettehnologii.imaps.backendRender.web.controllers;
+
+import internettehnologii.imaps.backendRender.web.config.OAuthConfig;
+import internettehnologii.imaps.backendRender.web.service.interfaces.OAuthService;
+import internettehnologii.imaps.backendRender.web.service.interfaces.StateStore;
+import internettehnologii.imaps.backendRender.web.util.DTO.UserAuthSuccessDTO;
+import internettehnologii.imaps.backendRender.web.util.OAuthProviders;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.*;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.client.RestTemplate;
+
+import java.net.URI;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+
+@Controller
+@RequestMapping("/api/oauth")
+public class OAuthController {
+
+    private final StateStore stateStore;
+
+    private final OAuthService githubOAuthService;
+    private final OAuthService googleOAuthService;
+    private final OAuthConfig oAuthConfig;
+
+    private final RestTemplate restTemplate = new RestTemplate();
+
+    public OAuthController(StateStore stateStore,
+                           @Qualifier("githubOAuth") OAuthService githubOAuthService,
+                           @Qualifier("googleOAuth") OAuthService googleOAuthService,
+                           OAuthConfig oAuthConfig) {
+
+        this.stateStore = stateStore;
+        this.githubOAuthService = githubOAuthService;
+        this.googleOAuthService = googleOAuthService;
+        this.oAuthConfig = oAuthConfig;
+    }
+
+
+    @GetMapping("/state")
+    public ResponseEntity<String> getState() {
+        String uuid = UUID.randomUUID().toString();
+        stateStore.storeState(uuid);
+        return ResponseEntity.ok(uuid);
+    }
+
+
+    @GetMapping("/callback/github")
+    public ResponseEntity<UserAuthSuccessDTO> callbackGithub(@RequestParam("code") String code,
+                                                             @RequestParam("state") String state) {
+
+        if(!stateStore.isValidState(state))
+            throw new InvalidStateException("State is not valid: " + state);
+
+
+        String accessToken = exchangeCodeForAccessToken(code,OAuthProviders.GITHUB.name());
+        String userInfo = fetchUserInfo(accessToken,OAuthProviders.GITHUB.name());
+        System.out.println("User info: " + userInfo);
+        UserAuthSuccessDTO userAuthSuccessDTO = githubOAuthService.login(userInfo,accessToken);
+
+
+        String encodedUsrname = URLEncoder.encode(userAuthSuccessDTO.getUsername(), StandardCharsets.UTF_8);
+        String encodedToken = URLEncoder.encode(userAuthSuccessDTO.getToken(), StandardCharsets.UTF_8);
+
+        HttpHeaders headers = new HttpHeaders();
+        headers.setLocation(URI.create("https://imaps.mk/auth-callback?token=" + encodedToken + "&username=" + encodedUsrname));
+        headers.add("Set-Cookie", "Authorization=Bearer " + userAuthSuccessDTO + "; HttpOnly; Path=/; SameSite=Strict");
+
+        return new ResponseEntity<>(userAuthSuccessDTO,headers, HttpStatus.FOUND);
+    }
+    @GetMapping("/callback/google")
+    public ResponseEntity<UserAuthSuccessDTO> callbackGoogle(@RequestParam("code") String code,
+                                                             @RequestParam("state") String state){
+
+        if(!stateStore.isValidState(state))
+            throw new InvalidStateException("State is not valid: " + state);
+
+        String accessToken = exchangeCodeForAccessToken(code,OAuthProviders.GOOGLE.name());
+        String userInfo = fetchUserInfo(accessToken,OAuthProviders.GOOGLE.name());
+        UserAuthSuccessDTO userAuthSuccessDTO = googleOAuthService.login(userInfo,accessToken);
+
+        String encodedUsrname = URLEncoder.encode(userAuthSuccessDTO.getUsername(), StandardCharsets.UTF_8);
+        String encodedToken = URLEncoder.encode(userAuthSuccessDTO.getToken(), StandardCharsets.UTF_8);
+
+        HttpHeaders headers = new HttpHeaders();
+        headers.setLocation(URI.create("https://imaps.mk/auth-callback?token=" + encodedToken + "&username=" + encodedUsrname));
+        headers.add("Set-Cookie", "Authorization=Bearer " + userAuthSuccessDTO + "; HttpOnly; Path=/; SameSite=Strict");
+        return new ResponseEntity<>(userAuthSuccessDTO,headers, HttpStatus.FOUND);
+    }
+
+    Map<String,String> getBodyByProvider(String provider,String code) {
+        Map<String, String> body = new HashMap<>();
+        if(provider.equals(OAuthProviders.GOOGLE.name())){
+            body.put("client_id", oAuthConfig.getGOOGLE_CLIENT_ID());
+            body.put("client_secret", oAuthConfig.getGOOGLE_CLIENT_SECRET());
+            body.put("code", code);
+            body.put("redirect_uri", oAuthConfig.getGOOGLE_REDIRECT_URI());
+            body.put("grant_type", "authorization_code");
+        } else {
+            body.put("client_id", oAuthConfig.getGITHUB_CLIENT_ID());
+            body.put("client_secret", oAuthConfig.getGITHUB_CLIENT_SECRET());
+            body.put("code", code);
+            body.put("redirect_uri", oAuthConfig.getGITHUB_REDIRECT_URI());
+            body.put("scope","user");
+        }
+
+        return body;
+    }
+
+    private String exchangeCodeForAccessToken(String code,String provider) {
+        HttpHeaders headers = new HttpHeaders();
+        headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
+
+        String url = Objects.equals(provider, OAuthProviders.GOOGLE.name()) ? oAuthConfig.getGOOGLE_TOKEN_URL() : oAuthConfig.getGITHUB_TOKEN_URL();
+
+        Map<String, String> body = getBodyByProvider(provider,code);
+        HttpEntity<Map<String,String>> request = new HttpEntity<>(body,headers);
+
+        ResponseEntity<Map> response = restTemplate.postForEntity(url, request, Map.class);
+        Map<String,Object> respBody = response.getBody();
+
+        return (String) respBody.get("access_token");
+    }
+
+    private String fetchUserInfo(String accessToken,String provider){
+        String url = Objects.equals(provider, OAuthProviders.GOOGLE.name()) ? oAuthConfig.getGOOGLE_USER_URL() : oAuthConfig.getGITHUB_USER_URL();
+
+        HttpHeaders headers = new HttpHeaders();
+        headers.setBearerAuth(accessToken);
+        HttpEntity<Void> request = new HttpEntity<>(headers);
+        ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, request, String.class);
+
+        return response.getBody();
+    }
+
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IMapsUser.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IMapsUser.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IMapsUser.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -30,4 +30,12 @@
     @Column(name = "profile_image_url")
     private String profileImageUrl;
+    @Column(name = "oauth_provider")
+    private String OAuthProvider;
+    @Column(name = "oauth_id")
+    private String oAuthId;
+    @Column(name = "access_token")
+    private String accessToken;
+    @Column(name = "refresh_token")
+    private String refreshToken;
 
     @ManyToMany
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IndoorMap.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IndoorMap.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/IndoorMap.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -1,3 +1,4 @@
 package internettehnologii.imaps.backendRender.web.entities;
+import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
 import jakarta.persistence.*;
 import lombok.Getter;
@@ -44,4 +45,5 @@
     private Boolean isPublished;
 
+
     @ManyToOne
     @JoinColumn(name = "usr_id",referencedColumnName = "id", nullable = false)
@@ -70,3 +72,14 @@
     }
 
+
+    public MapDTO toMapDTO(){
+        return  new MapDTO(getName(),
+                getMapType(),
+                getCreatedAt(),
+                getModifiedAt(),
+                getStatus().name(),
+                getFavouriteCount(),
+                getGmapsUrl());
+    }
+
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/MAP_STATUS.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/MAP_STATUS.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/MAP_STATUS.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -4,4 +4,4 @@
     PUBLIC,
     PRIVATE,
-    INVALID,
+    PENDING,
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/Report.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/Report.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/entities/Report.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,46 @@
+package internettehnologii.imaps.backendRender.web.entities;
+
+import jakarta.persistence.*;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+@Entity
+@Table(name = "reports")
+@Getter
+@Setter
+public class Report {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private int id;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "user_id", nullable = false)
+    private IMapsUser user;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "map_id", nullable = false)
+    private IndoorMap map;
+
+    @Column(nullable = false)
+    private String subject;
+
+    @Column(nullable = false, columnDefinition = "TEXT")
+    private String content;
+
+    @Column(name = "created_at", nullable = false)
+    private LocalDateTime createdAt;
+
+    public Report() {
+        this.createdAt = LocalDateTime.now();
+    }
+
+    public Report(IMapsUser user, IndoorMap map, String subject, String content) {
+        this.user = user;
+        this.map = map;
+        this.subject = subject;
+        this.content = content;
+        this.createdAt = LocalDateTime.now();
+    }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/FloorRepository.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/FloorRepository.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/FloorRepository.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -22,6 +22,6 @@
     @Query("SELECT COUNT(f) > 0 FROM Floor f WHERE f.floorNumber = ?1 AND f.indoorMap = ?2")
     boolean existsFloorForMap(Integer floorNumber, IndoorMap indoorMap);
+    void deleteFloorByFloorNumberAndIndoorMap(Integer floorNumber,IndoorMap indoorMap);
 
-    void deleteFloorByFloorNumberAndIndoorMap(Integer floorNumber,IndoorMap indoorMap);
     Optional<Floor> findFloorByFloorNumberAndIndoorMap(Integer floorNumber,IndoorMap indoorMap);
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/ReportRepository.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/ReportRepository.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/ReportRepository.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+package internettehnologii.imaps.backendRender.web.repo;
+
+import internettehnologii.imaps.backendRender.web.entities.Report;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ReportRepository extends JpaRepository<Report, Integer> {
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/UserRepository.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/UserRepository.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/repo/UserRepository.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -6,4 +6,5 @@
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
 import java.util.Optional;
 
@@ -25,3 +26,8 @@
     value = "SELECT * FROM users u WHERE u.id= ?1")
     Optional<IMapsUser> getUserById(Long usrid);
+    @Query(value = "FROM IMapsUser u WHERE u.oAuthId = ?1")
+    Optional<IMapsUser> getUserByOAuthId(String oauthid);
+    @Query(nativeQuery = true,
+            value = "SELECT u.* FROM users u LEFT JOIN users_roles ur on u.id = ur.user_id where ur.role_id = 3;")
+    Optional<List<IMapsUser>> getAllAdmins();
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/CorsConfigurationImpl.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/CorsConfigurationImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/CorsConfigurationImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,57 @@
+package internettehnologii.imaps.backendRender.web.security;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.stereotype.Component;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.CorsConfigurationSource;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+
+@Component
+public class CorsConfigurationImpl {
+    private final CorsConfigurationSource corsConfigurationSource;
+
+    public CorsConfigurationImpl(CorsConfigurationSource corsConfigurationSource) {
+        this.corsConfigurationSource = corsConfigurationSource;
+    }
+
+    @Bean
+    @Profile("dev")
+    @Primary
+    public CorsConfigurationSource corsConfigurationSourceDev() {
+        CorsConfiguration configuration = new CorsConfiguration();
+        configuration.addAllowedOrigin("http://localhost:5173");
+        configuration.addAllowedMethod("*");
+        configuration.addAllowedHeader("*");
+        configuration.addAllowedHeader("*");
+        configuration.setAllowCredentials(true);
+
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", configuration);
+
+        return source;
+    }
+
+    @Bean
+    @Profile("prod")
+    @Primary
+    public CorsConfigurationSource corsConfigurationSourceProd() {
+        CorsConfiguration configuration = new CorsConfiguration();
+        configuration.addAllowedOrigin("http://localhost");
+        configuration.addAllowedOrigin("https://imaps.mk");
+        configuration.addAllowedOrigin("https://www.imaps.mk");
+        configuration.addAllowedMethod("*");
+        configuration.addAllowedHeader("*");
+        configuration.setAllowCredentials(true);
+
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", configuration);
+
+        return source;
+    }
+
+    public CorsConfigurationSource getCorsConfigurationSource() {
+        return corsConfigurationSource;
+    }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/JwtFilter.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/JwtFilter.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/JwtFilter.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -37,5 +37,9 @@
     protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
         System.out.println(request.getRequestURI());
-        if(request.getRequestURI().contains("/login") || request.getRequestURI().contains("/register")) {
+        if(
+                request.getRequestURI().contains("/login") ||
+                        request.getRequestURI().contains("/register") ||
+                        request.getMethod().equals("OPTIONS")
+        ) {
             filterChain.doFilter(request, response);
         }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/WebSecurityConfig.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/WebSecurityConfig.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/security/WebSecurityConfig.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -5,4 +5,6 @@
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
 import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.authentication.AuthenticationProvider;
@@ -15,4 +17,5 @@
 import org.springframework.security.config.http.SessionCreationPolicy;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.security.web.SecurityFilterChain;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
@@ -28,6 +31,14 @@
     private MapUserDetailsService userDetailsService;
 
+    private final PasswordEncoder passwordEncoder;
+
     @Autowired
     private JwtFilter jwtFilter;
+    private final CorsConfigurationImpl corsConfiguration;
+
+    public WebSecurityConfig(PasswordEncoder passwordEncoder, CorsConfigurationImpl corsConfiguration) {
+        this.passwordEncoder = passwordEncoder;
+        this.corsConfiguration = corsConfiguration;
+    }
 
     @Bean
@@ -35,15 +46,13 @@
          http
                  .csrf(AbstractHttpConfigurer::disable)
-                 .cors(Customizer.withDefaults())
+                 .cors(cors -> cors.configurationSource(corsConfiguration.corsConfigurationSourceDev()))
                  .authorizeHttpRequests(request ->
-                         request.requestMatchers("/protected/**")
-                         .hasRole("USER")
-                         .requestMatchers("/api/admin/**")
-                         .hasRole("ADMIN")
-                         .anyRequest()
-                         .permitAll())
+                         request
+                                 .requestMatchers("/protected/**").hasRole("USER")
+                                 .requestMatchers("/api/admin/**").hasRole("ADMIN")
+                                 .anyRequest().permitAll())
+
                  .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
                  .addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter.class);
-         
 
         return http.build();
@@ -51,18 +60,4 @@
 
 
-    @Bean
-    public CorsConfigurationSource corsConfigurationSource() {
-        CorsConfiguration configuration = new CorsConfiguration();
-        configuration.addAllowedOrigin("http://localhost:5173/");
-        configuration.addAllowedMethod("*");
-        configuration.addAllowedHeader("*");
-        configuration.addAllowedHeader("*");
-        configuration.setAllowCredentials(true);
-
-        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
-        source.registerCorsConfiguration("/**", configuration);
-
-        return source;
-    }
 
 
@@ -70,5 +65,5 @@
     public AuthenticationProvider authenticationProvider() {
         DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
-        daoAuthenticationProvider.setPasswordEncoder(new BCryptPasswordEncoder(12));
+        daoAuthenticationProvider.setPasswordEncoder(passwordEncoder);
         daoAuthenticationProvider.setUserDetailsService(userDetailsService);
         return daoAuthenticationProvider;
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GitHubOAuthService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GitHubOAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GitHubOAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,87 @@
+package internettehnologii.imaps.backendRender.web.service.impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import internettehnologii.imaps.backendRender.web.controllers.InvalidStateException;
+import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
+import internettehnologii.imaps.backendRender.web.entities.RBA.Role;
+import internettehnologii.imaps.backendRender.web.repo.RoleRepository;
+import internettehnologii.imaps.backendRender.web.repo.UserRepository;
+import internettehnologii.imaps.backendRender.web.service.interfaces.OAuthService;
+import internettehnologii.imaps.backendRender.web.util.DTO.GitHubUserInfo;
+import internettehnologii.imaps.backendRender.web.util.DTO.UserAuthSuccessDTO;
+import internettehnologii.imaps.backendRender.web.util.OAuthProviders;
+import internettehnologii.imaps.backendRender.web.util.UserPrincipal;
+import jakarta.transaction.Transactional;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import javax.management.relation.RoleNotFoundException;
+import java.util.Optional;
+
+@Service("githubOAuth")
+public class GitHubOAuthService implements OAuthService {
+    private final UserRepository userRepository;
+    private final PasswordEncoder passwordEncoder;
+    private final JWTService jwtService;
+    private final RoleRepository roleRepository;
+
+    public GitHubOAuthService(UserRepository userRepository, PasswordEncoder passwordEncoder, JWTService jwtService, RoleRepository roleRepository) {
+        this.userRepository = userRepository;
+        this.passwordEncoder = passwordEncoder;
+        this.jwtService = jwtService;
+        this.roleRepository = roleRepository;
+    }
+
+
+    @Override
+    @Transactional
+    public UserAuthSuccessDTO login(String userInfo, String accessToken) {
+        ObjectMapper mapper = new ObjectMapper();
+        GitHubUserInfo oAuthUserInfo;
+
+        try {
+            oAuthUserInfo = mapper.readValue(userInfo, GitHubUserInfo.class);
+        } catch (JsonProcessingException e) {
+            throw new RuntimeException("Failed to parse GitHub user info.", e);
+        }
+
+        Optional<IMapsUser> userOpt = userRepository.getUserByOAuthId(oAuthUserInfo.getId());
+        IMapsUser user = userOpt.orElseGet(() -> createNewUser(oAuthUserInfo));
+        user.setAccessToken(passwordEncoder.encode(accessToken));
+        userRepository.save(user);
+
+        String token = jwtService.generateToken(new UserPrincipal(user));
+
+        return new UserAuthSuccessDTO(
+                token,
+                user.getUsername(),
+                jwtService.getAuthorities(token).toString()
+        );
+    }
+
+    private IMapsUser createNewUser(GitHubUserInfo oAuthUserInfo) {
+        IMapsUser newUser = new IMapsUser();
+
+        newUser.setEmail(oAuthUserInfo.getEmail());
+        newUser.setOAuthId(oAuthUserInfo.getId());
+        newUser.setOAuthProvider(OAuthProviders.GITHUB.name());
+        newUser.setUsername(generateUniqueUsername(oAuthUserInfo));
+
+        Role userRole = roleRepository.findByName("USER")
+                .orElseThrow(() -> new RuntimeException("User role not found."));
+
+        userRole.getUsers().add(newUser);
+        newUser.getRoles().add(userRole);
+
+        return newUser;
+    }
+
+    private String generateUniqueUsername(GitHubUserInfo oAuthUserInfo) {
+        String login = oAuthUserInfo.getLogin();
+        String idSubstring = oAuthUserInfo.getId()
+                .substring(login.length() - 3, login.length() - 1);
+        return login + idSubstring;
+    }
+
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GoogleOAuthService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GoogleOAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/GoogleOAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,84 @@
+package internettehnologii.imaps.backendRender.web.service.impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
+import internettehnologii.imaps.backendRender.web.entities.RBA.Role;
+import internettehnologii.imaps.backendRender.web.repo.RoleRepository;
+import internettehnologii.imaps.backendRender.web.repo.UserRepository;
+import internettehnologii.imaps.backendRender.web.service.interfaces.OAuthService;
+import internettehnologii.imaps.backendRender.web.util.DTO.GitHubUserInfo;
+import internettehnologii.imaps.backendRender.web.util.DTO.GoogleUserInfo;
+import internettehnologii.imaps.backendRender.web.util.DTO.UserAuthSuccessDTO;
+import internettehnologii.imaps.backendRender.web.util.OAuthProviders;
+import internettehnologii.imaps.backendRender.web.util.UserPrincipal;
+import jakarta.transaction.Transactional;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import java.util.Optional;
+
+@Service("googleOAuth")
+public class GoogleOAuthService implements OAuthService {
+    private final UserRepository userRepository;
+    private final PasswordEncoder passwordEncoder;
+    private final JWTService jwtService;
+    private final RoleRepository roleRepository;
+
+    public GoogleOAuthService(UserRepository userRepository, PasswordEncoder passwordEncoder, JWTService jwtService, RoleRepository roleRepository) {
+        this.userRepository = userRepository;
+        this.passwordEncoder = passwordEncoder;
+        this.jwtService = jwtService;
+        this.roleRepository = roleRepository;
+    }
+
+    @Override
+    @Transactional
+    public UserAuthSuccessDTO login(String userInfo, String accessToken) {
+        ObjectMapper mapper = new ObjectMapper();
+        GoogleUserInfo oAuthUserInfo;
+
+        try {
+            oAuthUserInfo = mapper.readValue(userInfo, GoogleUserInfo.class);
+        } catch (JsonProcessingException e) {
+            throw new RuntimeException("Failed to parse Google user info.", e);
+        }
+
+        Optional<IMapsUser> userOpt = userRepository.getUserByOAuthId(oAuthUserInfo.getId());
+        IMapsUser user = userOpt.orElseGet(() -> createNewUser(oAuthUserInfo));
+        user.setAccessToken(passwordEncoder.encode(accessToken));
+        userRepository.save(user);
+
+        String token = jwtService.generateToken(new UserPrincipal(user));
+
+        return new UserAuthSuccessDTO(
+                token,
+                user.getUsername(),
+                jwtService.getAuthorities(token).toString()
+        );
+    }
+
+    private IMapsUser createNewUser(GoogleUserInfo oAuthUserInfo) {
+        IMapsUser newUser = new IMapsUser();
+
+        newUser.setEmail(oAuthUserInfo.getEmail());
+        newUser.setOAuthId(oAuthUserInfo.getId());
+        newUser.setOAuthProvider(OAuthProviders.GOOGLE.name());
+        newUser.setUsername(generateUniqueUsername(oAuthUserInfo));
+
+        Role userRole = roleRepository.findByName("USER")
+                .orElseThrow(() -> new RuntimeException("User role not found."));
+
+        userRole.getUsers().add(newUser);
+        newUser.getRoles().add(userRole);
+
+        return newUser;
+    }
+
+    private String generateUniqueUsername(GoogleUserInfo oAuthUserInfo) {
+        String username = oAuthUserInfo.getName();
+        String idSubstring = oAuthUserInfo.getId()
+                .substring(username.length() - 3, username.length() - 1);
+        return username + idSubstring;
+    }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/MapServiceImpl.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/MapServiceImpl.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/MapServiceImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -1,5 +1,8 @@
 package internettehnologii.imaps.backendRender.web.service.impl;
 
-import internettehnologii.imaps.backendRender.web.entities.*;
+import internettehnologii.imaps.backendRender.web.entities.Floor;
+import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
+import internettehnologii.imaps.backendRender.web.entities.IndoorMap;
+import internettehnologii.imaps.backendRender.web.entities.MAP_STATUS;
 import internettehnologii.imaps.backendRender.web.exceptions.MapNameTakenException;
 import internettehnologii.imaps.backendRender.web.exceptions.MapNotFoundException;
@@ -8,4 +11,7 @@
 import internettehnologii.imaps.backendRender.web.repo.UserRepository;
 import internettehnologii.imaps.backendRender.web.service.interfaces.MapService;
+import internettehnologii.imaps.backendRender.web.util.DTO.EditMapDTO;
+import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
+import jakarta.transaction.Transactional;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
@@ -31,5 +37,5 @@
 
     @Override
-    public void createMap(String mapName,String mapType, String username) {
+    public void createMap(String mapName, String username) {
 
         Optional<IMapsUser> user = userRepository.findUserByName(username);
@@ -38,5 +44,5 @@
             throw new MapNameTakenException("Map with name " + mapName + " already exists");
 
-        if(user.isEmpty()){
+        if (user.isEmpty()) {
             throw new UsernameNotFoundException("User " + username + " not found");
         }
@@ -58,4 +64,19 @@
     public void updateMap(IndoorMap indoorMap) {
         mapRepository.save(indoorMap);
+    }
+
+    @Transactional
+    @Override
+    public MapDTO updateMapInfo(EditMapDTO editMapDTO) {
+        IndoorMap indoorMap = mapRepository.getIndoorMapByName(editMapDTO.getInitialName()).orElseThrow(() -> new MapNotFoundException("Map with name " + editMapDTO.getInitialName() + " not found"));
+        if (mapRepository.existsByName(editMapDTO.getName()) && !Objects.equals(editMapDTO.getInitialName(), editMapDTO.getName())) {
+            throw new MapNameTakenException("Map with name " + editMapDTO.getName() + " already exists");
+        }
+
+        indoorMap.setName(editMapDTO.getName());
+        indoorMap.setGmapsUrl(editMapDTO.getGmapsUrl());
+//        indoorMap.setMapType(editMapDTO.getType()); //TODO
+        mapRepository.save(indoorMap);
+        return indoorMap.toMapDTO();
     }
 
@@ -85,5 +106,5 @@
         boolean isAdmin = user.getRoles().stream().anyMatch(role -> Objects.equals(role.getName(), "ADMIN"));
 
-        if(isAdmin){
+        if (isAdmin) {
             return map;
         }
@@ -99,5 +120,5 @@
     @Override
     public IndoorMap getMapByName(String mapName) {
-       return mapRepository.getIndoorMapByName(mapName).orElseThrow(() -> new MapNotFoundException(mapName));
+        return mapRepository.getIndoorMapByName(mapName).orElseThrow(() -> new MapNotFoundException(mapName));
     }
 
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/OAuthStateStore.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/OAuthStateStore.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/OAuthStateStore.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,24 @@
+package internettehnologii.imaps.backendRender.web.service.impl;
+
+import internettehnologii.imaps.backendRender.web.service.interfaces.StateStore;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+@Service
+public class OAuthStateStore implements StateStore {
+
+    private final Map<String, Long> stateStore = new ConcurrentHashMap<>();
+
+    @Override
+    public void storeState(String state) {
+        stateStore.put(state, System.currentTimeMillis());
+    }
+
+    @Override
+    public boolean isValidState(String state) {
+        Long timestamp = stateStore.remove(state);
+        return timestamp != null && System.currentTimeMillis() - timestamp < 300000; // 5min
+    }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/PublishRequestServiceImpl.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/PublishRequestServiceImpl.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/PublishRequestServiceImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -7,8 +7,13 @@
 import internettehnologii.imaps.backendRender.web.repo.MapRepository;
 import internettehnologii.imaps.backendRender.web.repo.PublishRequestRepository;
+import internettehnologii.imaps.backendRender.web.repo.UserRepository;
 import internettehnologii.imaps.backendRender.web.service.interfaces.MapService;
 import internettehnologii.imaps.backendRender.web.service.interfaces.PublishRequestService;
 import internettehnologii.imaps.backendRender.web.service.interfaces.UserService;
+import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
 import internettehnologii.imaps.backendRender.web.util.DTO.PublishMapDTO;
+import jakarta.transaction.Transactional;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
 import org.springframework.stereotype.Service;
 
@@ -22,14 +27,18 @@
     private final MapService mapService;
     private final UserService userService;
+    //private final JavaMailSender mailSender;
+    private final UserRepository userRepository;
 
-    public PublishRequestServiceImpl(PublishRequestRepository publishRequestRepository, MapRepository mapRepository, MapService mapService, UserService userService) {
+    public PublishRequestServiceImpl(PublishRequestRepository publishRequestRepository, MapRepository mapRepository, MapService mapService, UserService userService, UserRepository userRepository) {
         this.publishRequestRepository = publishRequestRepository;
         this.mapRepository = mapRepository;
         this.mapService = mapService;
         this.userService = userService;
+        this.userRepository = userRepository;
     }
 
     @Override
-    public void addPublishRequest(PublishMapDTO formData, IMapsUser user) {
+    @Transactional
+    public MapDTO addPublishRequest(PublishMapDTO formData, IMapsUser user) {
         Optional<PublishRequest> prOptional = publishRequestRepository.findById(formData.getId());
         PublishRequest pr;
@@ -41,20 +50,21 @@
             pr.setGMapsUrl(formData.getGoogleMapsUrl());
             pr.setMapType(formData.getMapType());
-            map.setStatus(MAP_STATUS.INVALID);
+            map.setStatus(MAP_STATUS.PENDING);
         } else {
             pr = new PublishRequest(formData.getName(), formData.getLastName(), formData.getGoogleMapsUrl(), formData.getMapType());
-
             pr.setMap(map);
             pr.setUser(user);
-            map.setStatus(MAP_STATUS.INVALID);
+            map.setStatus(MAP_STATUS.PENDING);
 
         }
         this.mapRepository.save(map);
         this.publishRequestRepository.save(pr);
+        sendMailToAdmins(user,pr);
+        return map.toMapDTO();
 
     }
 
     @Override
-    public void denyPublishRequest(int id) throws Exception {
+    public void denyPublishRequest(int id,String reason) throws Exception {
         PublishRequest pr = this.publishRequestRepository.findById(id).orElseThrow(Exception::new);
 
@@ -66,4 +76,12 @@
         this.publishRequestRepository.save(pr);
         this.mapRepository.save(map);
+
+//        SimpleMailMessage message = new SimpleMailMessage();
+//
+//        message.setTo(pr.getMap().getUser().getEmail());
+//        message.setSubject("Denied Publish Request");
+//        message.setText(String.format("Your publish request for map: %s has been denied." +
+//                "\nReason:\n%s",pr.getMap().getName(),reason));
+//        mailSender.send(message);
     }
 
@@ -77,6 +95,39 @@
 
     }
+    @Override
+    public void sendMailToAdmins(IMapsUser user, PublishRequest pr){
+//        System.out.println("test");
+//        SimpleMailMessage message = new SimpleMailMessage();
+//        Optional<List<IMapsUser>> adminsOpt = userRepository.getAllAdmins();
+//        adminsOpt.ifPresent(admins -> {
+//            admins.forEach(admin -> {
+//                message.setTo(admin.getEmail());
+//                message.setSubject("New Publish Request");
+//                String body = String.format(
+//                        """
+//                                Publish Request Details:
+//                                \tRequest Id: %s
+//                                \tMap Id: %s
+//                                \tMap Name: %s
+//
+//                                User Details:
+//                                \tId: %s
+//                                \tUsername: %s
+//                                \tEmail: %s
+//                                \tFirst Name: %s
+//                                \t Last Name: %s
+//                                """,
+//                        pr.getId(), pr.getMap().getId(),
+//                        pr.getMap().getName(),
+//                        user.getId(),user.getUsername(),user.getEmail(),
+//                        pr.getName(),pr.getLastName());
+//
+//                message.setText(body);
+//                mailSender.send(message);
+//            });
+//        });
 
-    // todo mail pustanje
+    }
+
 
     @Override
@@ -93,4 +144,11 @@
         this.publishRequestRepository.save(pr);
         this.mapRepository.save(map);
+
+//        SimpleMailMessage message = new SimpleMailMessage();
+//        message.setTo(pr.getMap().getUser().getEmail());
+//        message.setSubject("Approved Publish Request");
+//        message.setText(String.format("Your publish request for map: %s has been approved!\nYour map is now public. That means that anyone can view and use your map.\nThank you for building!",pr.getMap().getName()));
+//        mailSender.send(message);
+
     }
 
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/ReportServiceImpl.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/ReportServiceImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/ReportServiceImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,73 @@
+package internettehnologii.imaps.backendRender.web.service.impl;
+
+import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
+import internettehnologii.imaps.backendRender.web.entities.Report;
+import internettehnologii.imaps.backendRender.web.repo.ReportRepository;
+import internettehnologii.imaps.backendRender.web.repo.UserRepository;
+import internettehnologii.imaps.backendRender.web.service.interfaces.ReportService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Optional;
+
+
+@Service
+public class ReportServiceImpl implements ReportService {
+    private final ReportRepository reportRepository;
+    private final JavaMailSender mailSender;
+    private final UserRepository userRepository;
+
+
+    public ReportServiceImpl(ReportRepository reportRepository, JavaMailSender mailSender, UserRepository userRepository) {
+        this.reportRepository = reportRepository;
+        this.mailSender = mailSender;
+        this.userRepository = userRepository;
+    }
+
+
+    @Override
+    public void saveReport(Report report) {
+        reportRepository.save(report);
+        //sendMailToAdmins(report);
+    }
+
+    @Override
+    public List<Report> getReports() {
+        return reportRepository.findAll();
+    }
+
+    public void sendMailToAdmins(Report report) {
+        SimpleMailMessage message = new SimpleMailMessage();
+        Optional<List<IMapsUser>> adminsOpt = userRepository.getAllAdmins();
+        System.out.println("MAIL " + report);
+        adminsOpt.ifPresent(admins -> {
+            admins.forEach(admin -> {
+                message.setTo(admin.getEmail());
+                message.setSubject("New Report Submitted");
+                String body = String.format(
+                        """
+                        A new report has been submitted:
+                        
+                        Report Details:
+                        \tReport Id: %s
+                        \tSubject: %s
+                        \tContent: %s
+                        \tSubmitted By: %s
+
+                        """,
+                        report.getId(),
+                        report.getSubject(),
+                        report.getContent(),
+                        report.getUser() != null ? report.getUser().getUsername() : "Unknown"
+                );
+                message.setText(body);
+                System.out.println("MESSAGE: " + message);
+                mailSender.send(message);
+            });
+        });
+    }
+
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/UserServiceImpl.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/UserServiceImpl.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/impl/UserServiceImpl.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -21,4 +21,5 @@
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 
@@ -31,5 +32,7 @@
     private final UserRepository userRepository;
 
-    private final BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder(12);
+    @Autowired
+    private PasswordEncoder passwordEncoder;
+
     @Autowired
     private JWTService jwtService;
@@ -56,5 +59,5 @@
         });
 
-        user.setPassword(bCryptPasswordEncoder.encode(user.getPassword()));
+        user.setPassword(passwordEncoder.encode(user.getPassword()));
 
         Role userRole = roleRepository.findByName("USER").orElseThrow(RoleNotFoundException::new);
@@ -84,5 +87,5 @@
 
     @Override
-    public void addToFavorites(IMapsUser user, IndoorMap map) {
+    public void addFavoriteMap(IMapsUser user, IndoorMap map) {
         user.getFavoriteMaps().add(map);
         userRepository.save(user);
@@ -90,5 +93,5 @@
 
     @Override
-    public void removeFromFavorites(IMapsUser user, IndoorMap map) {
+    public void removeFavoriteMap(IMapsUser user, IndoorMap map) {
         boolean removed = user.getFavoriteMaps().remove(map);
         if(!removed) throw new MapNotFoundException("Map not found. " + map.getName());
@@ -104,4 +107,3 @@
 
 
-
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/MapService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/MapService.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/MapService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -4,10 +4,13 @@
 import internettehnologii.imaps.backendRender.web.entities.MAP_STATUS;
 import internettehnologii.imaps.backendRender.web.entities.RoomType;
+import internettehnologii.imaps.backendRender.web.util.DTO.EditMapDTO;
+import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
 
 import java.util.List;
 
 public interface MapService {
-    void createMap(String mapName, String mapType, String username);
+    void createMap(String mapName, String username);
     void updateMap(IndoorMap indoorMap);
+    MapDTO updateMapInfo(EditMapDTO editMapDTO);
     void deleteMap(IndoorMap indoorMap);
     List<IndoorMap> getAllMapsForUser(String username);
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/OAuthService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/OAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/OAuthService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+package internettehnologii.imaps.backendRender.web.service.interfaces;
+
+import internettehnologii.imaps.backendRender.web.util.DTO.UserAuthSuccessDTO;
+
+public interface OAuthService {
+    UserAuthSuccessDTO login(String userInfo, String accessToken);
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/PublishRequestService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/PublishRequestService.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/PublishRequestService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -3,4 +3,5 @@
 import internettehnologii.imaps.backendRender.web.entities.IMapsUser;
 import internettehnologii.imaps.backendRender.web.entities.PublishRequest;
+import internettehnologii.imaps.backendRender.web.util.DTO.MapDTO;
 import internettehnologii.imaps.backendRender.web.util.DTO.PublishMapDTO;
 
@@ -8,6 +9,6 @@
 
 public interface PublishRequestService {
-    void addPublishRequest(PublishMapDTO publishRequestDTO, IMapsUser user);
-    void denyPublishRequest(int id) throws Exception;
+    MapDTO addPublishRequest(PublishMapDTO publishRequestDTO, IMapsUser user);
+    void denyPublishRequest(int id,String reason) throws Exception;
     List<PublishRequest> getAllPublishRequests();
     void save(PublishRequest publishRequest);
@@ -16,3 +17,4 @@
     PublishRequest getPublishRequestByMapName(String mapName);
     void editPublishRequest(PublishRequest publishRequest);
+    void sendMailToAdmins(IMapsUser user,PublishRequest pr);
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/ReportService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/ReportService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/ReportService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+package internettehnologii.imaps.backendRender.web.service.interfaces;
+
+import internettehnologii.imaps.backendRender.web.entities.Report;
+
+import java.util.List;
+
+public interface ReportService {
+
+    public void saveReport(Report report);
+    public List<Report> getReports();
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/StateStore.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/StateStore.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/StateStore.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+package internettehnologii.imaps.backendRender.web.service.interfaces;
+
+public interface StateStore {
+    void storeState(String state);
+    boolean isValidState(String state);
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/UserService.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/UserService.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/service/interfaces/UserService.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -7,11 +7,10 @@
 
 import javax.management.relation.RoleNotFoundException;
-import javax.naming.AuthenticationException;
 
 public interface UserService {
     IMapsUser register(IMapsUser user) throws RoleNotFoundException;
     UserAuthSuccessDTO login(UserLoginDTO user) throws Exception;
-    void addToFavorites(IMapsUser user, IndoorMap map);
-    void removeFromFavorites(IMapsUser user, IndoorMap map);
+    void addFavoriteMap(IMapsUser user, IndoorMap map);
+    void removeFavoriteMap(IMapsUser user, IndoorMap map);
     IMapsUser getUser(String username);
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/CreateMapDTO.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/CreateMapDTO.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/CreateMapDTO.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -10,4 +10,4 @@
 public class CreateMapDTO {
     private String name;
-    private String mapType;
+    public CreateMapDTO() {}
 }
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/EditMapDTO.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/EditMapDTO.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/EditMapDTO.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,17 @@
+package internettehnologii.imaps.backendRender.web.util.DTO;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+public class EditMapDTO {
+    String initialName;
+    String name;
+    String gmapsUrl;
+    String type;
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GitHubUserInfo.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GitHubUserInfo.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GitHubUserInfo.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,36 @@
+package internettehnologii.imaps.backendRender.web.util.DTO;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GitHubUserInfo {
+    @JsonProperty("login")
+    private String login;
+
+    @JsonProperty("id")
+    private String id;
+
+    @JsonProperty("name")
+    private String name;
+
+    @JsonProperty("email")
+    private String email;
+
+    @JsonProperty("avatar_url")
+    private String avatarUrl;
+
+    @Override
+    public String toString() {
+        return "UserInfo{" +
+                "login='" + login + '\'' +
+                ", id=" + id +
+                ", name='" + name + '\'' +
+                ", email='" + email + '\'' +
+                ", avatarUrl='" + avatarUrl + '\'' +
+                '}';
+    }
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GoogleUserInfo.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GoogleUserInfo.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/GoogleUserInfo.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,23 @@
+package internettehnologii.imaps.backendRender.web.util.DTO;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GoogleUserInfo {
+
+    @JsonProperty("sub")
+    private String id;
+
+    @JsonProperty("name")
+    private String name;
+
+    @JsonProperty("email")
+    private String email;
+
+    @JsonProperty("picture")
+    private String picture;
+
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/ReportDTO.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/ReportDTO.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/DTO/ReportDTO.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,14 @@
+package internettehnologii.imaps.backendRender.web.util.DTO;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@AllArgsConstructor
+@Data
+public class ReportDTO {
+    String username;
+    String mapName;
+    String subject;
+    String content;
+    String date;
+}
Index: imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/OAuthProviders.java
===================================================================
--- imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/OAuthProviders.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/java/internettehnologii/imaps/backendRender/web/util/OAuthProviders.java	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+package internettehnologii.imaps.backendRender.web.util;
+
+public enum OAuthProviders {
+    GITHUB,
+    GOOGLE
+}
Index: imaps-backend/backendRender/src/main/resources/application-dev.properties
===================================================================
--- imaps-backend/backendRender/src/main/resources/application-dev.properties	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/resources/application-dev.properties	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+github.client.id=${GITHUB_CLIENT_ID}
+github.client.secret=${GITHUB_CLIENT_SECRET}
+github.redirect.uri=http://${BACKEND_IP}:${BACKEND_PORT}/api/oauth/callback/github
+google.redirect.uri=http://${BACKEND_IP}:${BACKEND_PORT}/api/oauth/callback/google
+google.client.id=${GOOGLE_CLIENT_ID}
+google.client.secret=${GOOGLE_CLIENT_SECRET}
+
+spring.datasource.url=jdbc:postgresql://localhost:5432/imaps_prod
Index: imaps-backend/backendRender/src/main/resources/application-prod.properties
===================================================================
--- imaps-backend/backendRender/src/main/resources/application-prod.properties	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-backend/backendRender/src/main/resources/application-prod.properties	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+github.client.id=${GITHUB_CLIENT_ID}
+github.client.secret=${GITHUB_CLIENT_SECRET}
+github.redirect.uri=https://imaps.mk/api/oauth/callback/github
+google.redirect.uri=https://imaps.mk/api/oauth/callback/google
+google.client.id=${GOOGLE_CLIENT_ID}
+google.client.secret=${GOOGLE_CLIENT_SECRET}
+
+spring.datasource.url=jdbc:postgresql://${DB_IP}:${DB_PORT}/imaps_prod
Index: imaps-backend/backendRender/src/main/resources/application.properties
===================================================================
--- imaps-backend/backendRender/src/main/resources/application.properties	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-backend/backendRender/src/main/resources/application.properties	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -1,4 +1,3 @@
-spring.application.name=backendRender
-spring.datasource.url=jdbc:postgresql://localhost:5432/imaps_prod
+spring.application.name=imaps-backend
 spring.datasource.username=${DB_USER}
 spring.datasource.password=${DB_PASS}
@@ -8,4 +7,14 @@
 spring.jpa.properties.hibernate.format_sql=true
 
+
+
+spring.mail.host=smtp.gmail.com
+spring.mail.port=587
+spring.mail.username=${MAIL_NAME}
+spring.mail.password=${MAIL_PASS}
+spring.mail.properties.mail.smtp.auth=true
+spring.mail.properties.mail.smtp.starttls.enable=true
+
+spring.profiles.active=dev
 logging.level.org.springframework.web=DEBUG
 
Index: imaps-backend/backendRender/src/test/java/internettehnologii/imaps/backendRender/RouteGraphTest.java
===================================================================
--- imaps-backend/backendRender/src/test/java/internettehnologii/imaps/backendRender/RouteGraphTest.java	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ 	(revision )
@@ -1,41 +1,0 @@
-package internettehnologii.imaps.backendRender;
-
-import internettehnologii.imaps.backendRender.graph.Coordinates;
-import internettehnologii.imaps.backendRender.graph.MapNode;
-import internettehnologii.imaps.backendRender.graph.RouteGraph;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.BeforeEach;
-
-import java.util.*;
-import java.util.List;
-
-import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
-
-class RouteGraphTest {
-
-    private RouteGraph routeGraph;
-
-    @BeforeEach
-    void setUp() {
-        MapNode nodeA = new MapNode("A", new Coordinates<>(0.0, 0.0), Arrays.asList("B"));
-        MapNode nodeB = new MapNode("B", new Coordinates<>(5.0, 7.0), Arrays.asList("A","C","D"));
-        MapNode nodeC = new MapNode("C", new Coordinates<>(9.0, 7.0), Arrays.asList("B","D"));
-        MapNode nodeD = new MapNode("D", new Coordinates<>(9.0, 12.0), Arrays.asList("B","C"));
-
-        List<MapNode> nodes = Arrays.asList(nodeA, nodeB, nodeC,nodeD);
-        routeGraph = new RouteGraph();
-        routeGraph.loadNodeNames(nodes);
-    }
-
-    @Test
-    void testFindRouteBetweenConnectedNodes() {
-        List<MapNode> path = routeGraph.findRoute("D", "A");
-        for (MapNode node : path) {
-            System.out.print(
-                    node.getName() + " ---> "
-            );
-        }
-        assertThat(path).isNotEmpty();
-        //assertThat(path).extracting(MapNode::getName).containsExactly("A", "B", "C");
-    }
-}
