Index: sources/app/src/main/java/parkup/controllers/VrabotenController.java
===================================================================
--- sources/app/src/main/java/parkup/controllers/VrabotenController.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/controllers/VrabotenController.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -24,5 +24,5 @@
 
     @GetMapping({"/vraboten"})
-    public List<WorkerDemo> getAllVraboten() {
+    public List<Worker> getAllVraboten() {
         return this.workerService.getWorkers();
     }
@@ -46,5 +46,5 @@
     public Optional<Worker> addVraboten(@RequestBody AddUpdateWorker vraboten) {
         return this.workerService.addWorker(vraboten.getPassword(), vraboten.getConfirmPass(), vraboten.isLocked(),vraboten.getFirstName(), vraboten.getLastName(),
-                vraboten.getMobileNumber(), vraboten.getEmail(), vraboten.getStatus(),vraboten.getParkingZones());
+                vraboten.getMobile(), vraboten.getEmail(), vraboten.getStatus(),vraboten.getParkingZones());
     }
 
@@ -62,5 +62,5 @@
     public WorkerDemoParkingZones updateVraboten(@PathVariable int vrabotenId, @RequestBody AddUpdateWorker vraboten) {
         return this.workerService.updateWorker(vrabotenId,vraboten.getPassword(), vraboten.getConfirmPass(), vraboten.isLocked(),vraboten.getFirstName(), vraboten.getLastName(),
-                vraboten.getMobileNumber(), vraboten.getEmail(), vraboten.getStatus(),vraboten.getParkingZones());
+                vraboten.getMobile(), vraboten.getEmail(), vraboten.getStatus(),vraboten.getParkingZones());
     }
 
Index: sources/app/src/main/java/parkup/data/AddUpdateWorker.java
===================================================================
--- sources/app/src/main/java/parkup/data/AddUpdateWorker.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/data/AddUpdateWorker.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -13,8 +13,8 @@
     List<String> parkingZones;
     EmployeeStatus status;
-    String mobileNumber;
+    String mobile;
     boolean locked;
 
-    public AddUpdateWorker(String firstName, String lastName, String email, String password, String confirmPass, List<String> parkingZones, EmployeeStatus status, String mobileNumber, boolean locked) {
+    public AddUpdateWorker(String firstName, String lastName, String email, String password, String confirmPass, List<String> parkingZones, EmployeeStatus status, String mobile, boolean locked) {
         this.firstName = firstName;
         this.lastName = lastName;
@@ -24,5 +24,5 @@
         this.parkingZones = parkingZones;
         this.status = status;
-        this.mobileNumber = mobileNumber;
+        this.mobile = mobile;
         this.locked = locked;
     }
@@ -84,10 +84,10 @@
     }
 
-    public String getMobileNumber() {
-        return mobileNumber;
+    public String getMobile() {
+        return mobile;
     }
 
-    public void setMobileNumber(String mobileNumber) {
-        this.mobileNumber = mobileNumber;
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
     }
 
Index: sources/app/src/main/java/parkup/data/WorkerDemoParkingZones.java
===================================================================
--- sources/app/src/main/java/parkup/data/WorkerDemoParkingZones.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/data/WorkerDemoParkingZones.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -15,10 +15,18 @@
     private String lastName;
     private String email;
-    private String password;
     private String mobile;
     private UserRole role;
+    private boolean locked;
+
+    public boolean isLocked() {
+        return locked;
+    }
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
     private EmployeeStatus status;
     private List<String> pzNames;
-    private PasswordEncoder passwordEncoder;
 
     public WorkerDemoParkingZones(Worker v){
@@ -27,8 +35,8 @@
         this.lastName = v.getLastName();
         this.email = v.getEmail();
-        this.password = v.getPassword();
         this.mobile = v.getMobile();
         this.role = v.getRole();
         this.status = v.getStatus();
+        this.locked=v.isEnabled();
         this.pzNames = v.getParkingZones().stream().map(ParkingZone::getPzName).collect(Collectors.toList());
     }
@@ -66,12 +74,4 @@
     }
 
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
     public String getMobile() {
         return mobile;
Index: sources/app/src/main/java/parkup/data/enumarations/UserRole.java
===================================================================
--- sources/app/src/main/java/parkup/data/enumarations/UserRole.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/data/enumarations/UserRole.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -4,8 +4,8 @@
 
 public enum UserRole implements GrantedAuthority {
-    GUEST,
-    REG_USER,
-    WORKER,
-    ADMIN;
+    ROLE_USER,
+    ROLE_REG_USER,
+    ROLE_WORKER,
+    ROLE_ADMIN;
 
     @Override
Index: sources/app/src/main/java/parkup/entities/Administrator.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Administrator.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/Administrator.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -51,5 +51,5 @@
 
     public Administrator(){
-        this.role = UserRole.ADMIN;
+        this.role = UserRole.ROLE_ADMIN;
         this.enabled=true;
     }
@@ -63,5 +63,5 @@
         this.mobile = mobile;
         this.enabled=true;
-        this.role = UserRole.ADMIN;
+        this.role = UserRole.ROLE_ADMIN;
     }
 
@@ -72,5 +72,5 @@
         this.password = password;
         this.mobile = mobile;
-        this.role = UserRole.ADMIN;
+        this.role = UserRole.ROLE_ADMIN;
         this.enabled=true;
     }
@@ -82,5 +82,5 @@
         this.password = password;
         this.mobile = mobile;
-        this.role = UserRole.ADMIN;
+        this.role = UserRole.ROLE_ADMIN;
         this.enabled=true;
     }
Index: sources/app/src/main/java/parkup/entities/Guest.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Guest.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/Guest.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -47,5 +47,5 @@
 
 
-    public Guest() {this.role=UserRole.GUEST;}
+    public Guest() {this.role=UserRole.ROLE_USER;}
 
     public Guest(int guestId, Plate plate, String email, String mobile) {
@@ -54,5 +54,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role=UserRole.GUEST;
+        this.role=UserRole.ROLE_USER;
     }
 
@@ -61,5 +61,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role=UserRole.GUEST;
+        this.role=UserRole.ROLE_USER;
     }
 
Index: sources/app/src/main/java/parkup/entities/RegisteredUser.java
===================================================================
--- sources/app/src/main/java/parkup/entities/RegisteredUser.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/RegisteredUser.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -62,5 +62,5 @@
     public RegisteredUser() {
         this.plates = new ArrayList<Plate>();
-        this.role = UserRole.REG_USER;
+        this.role = UserRole.ROLE_REG_USER;
         session=null;
     }
@@ -74,5 +74,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role = UserRole.REG_USER;
+        this.role = UserRole.ROLE_REG_USER;
         session=null;
     }
@@ -85,5 +85,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role = UserRole.REG_USER;
+        this.role = UserRole.ROLE_REG_USER;
         session=null;
     }
@@ -95,5 +95,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role = UserRole.REG_USER;
+        this.role = UserRole.ROLE_REG_USER;
         session=null;
     }
Index: sources/app/src/main/java/parkup/entities/Worker.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Worker.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/Worker.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -60,5 +60,5 @@
     private UserRole role;
 
-    @ManyToMany(cascade = {CascadeType.ALL})
+    @ManyToMany
     private List<ParkingZone> parkingZones;
 
@@ -78,5 +78,5 @@
 
     public Worker() {
-        this.role = UserRole.WORKER;
+        this.role = UserRole.ROLE_WORKER;
         this.parkingZones = new ArrayList<ParkingZone>();
         this.enabled = true;
@@ -92,5 +92,5 @@
         this.mobile = mobile;
         this.parkingZones = parkingZones;
-        this.role = UserRole.WORKER;
+        this.role = UserRole.ROLE_WORKER;
         this.enabled = true;
         this.status = EmployeeStatus.NOT_WORKING;
@@ -104,5 +104,5 @@
         this.mobile = mobile;
         this.parkingZones = parkingZones;
-        this.role = UserRole.WORKER;
+        this.role = UserRole.ROLE_WORKER;
         this.enabled = true;
         this.status = EmployeeStatus.NOT_WORKING;
@@ -116,5 +116,5 @@
         this.mobile=mobile;
         this.parkingZones=new ArrayList<>();
-        this.role = UserRole.WORKER;
+        this.role = UserRole.ROLE_WORKER;
         this.enabled=true;
         this.status = EmployeeStatus.NOT_WORKING;
Index: sources/app/src/main/java/parkup/services/AdministratorService.java
===================================================================
--- sources/app/src/main/java/parkup/services/AdministratorService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/AdministratorService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -5,4 +5,5 @@
 import java.util.Optional;
 import java.util.UUID;
+import java.util.stream.Collectors;
 import javax.transaction.Transactional;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,10 +60,10 @@
         if (administratorOpt.isPresent()) {
             Administrator administratorNov = this.administratorRepository.findByAdministratorId(administratorId);
-            if (email != null && email.length() > 1 && email.contains("@") && !Objects.equals(administratorNov.getEmail(), email)) {
-                Optional<Administrator> userOpt1 = this.administratorRepository.findAdministratorByEmail(email);
-                if (userOpt1.isPresent()) {
-                    throw new IllegalStateException("email taken");
-                }
-                administratorNov.setEmail(email);
+            if (email != null && email.length() > 1 && email.contains("@")) {
+                List<String> emails = administratorRepository.findAll().stream().map(Administrator::getEmail).collect(Collectors.toList());
+                for(String mailToCheck :emails)
+                    if (email.equals(mailToCheck) && administratorNov.getAdministratorId()!=administratorId) {
+                        throw new IllegalStateException("email taken");
+                    }
             }else{
                 throw new IllegalStateException("email not valid");
Index: sources/app/src/main/java/parkup/services/ParkingSessionService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -49,23 +49,4 @@
     }
 
-   /* @Transactional
-    public void updateParkingSession(int parkingSessionId, String timeStart, String timeEnd, Tablicka tablicka) {
-        Optional<ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSessionId));
-        if (parkingSessionOpt.isPresent()) {
-            ParkingSession parkingSessionNov = parkingSessionRepository.findByPssId(parkingSessionId);
-
-            if(!parkingSessionNov.getTimeStart().equals(timeStart) && !parkingSessionNov.getTimeStart().equals(timeEnd))
-                parkingSessionNov.setTimeStart(timeStart);
-
-            if(!parkingSessionNov.getTimeEnd().equals(timeEnd) && !parkingSessionNov.getTimeEnd().equals(timeStart))
-                parkingSessionNov.setTimeEnd(timeEnd);
-
-            if(tablicka!=null && !Objects.equals(parkingSessionNov.getTablica(),tablicka)){
-                parkingSessionNov.setTablica(tablicka);
-            }
-        }else{
-            throw new IllegalStateException("The ParkingSession does not exist");
-        }
-    }*/
     @Transactional
     public Optional<ParkingSession> deleteParkingSession(int parkingSessionId) {
@@ -156,5 +137,5 @@
         String expYearString=date.split("/")[1];
         if(expMonthString.startsWith("0"))
-            expMonthString=expYearString.substring(1);
+            expMonthString=expMonthString.substring(1);
         if(expYearString.startsWith("0"))
             expYearString=expYearString.substring(1);
Index: sources/app/src/main/java/parkup/services/ParkingZoneService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -91,5 +91,5 @@
 
         //TODO prati niza od objekti ParkingSpaces i prati objekt ParkingZoneLocation
-
+        ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
             ParkingZone parkingZoneNov = parkingZoneRepository.findByPzId(parkingZoneId);
             if (parkingZoneNov!=null) {
@@ -132,7 +132,12 @@
                         parkingZoneNov.getParkingSpaces().add(ps);
                     }
+                }else{
+                    parkingZoneNov.setParkingSpaces(null);
                 }
                 if (!responsibleWorkers.isEmpty()) {
-                    ParkingZone parkingZone = parkingZoneRepository.findByPzId(parkingZoneId);
+
+                    for(Integer workerId: getResponsibleWorkers(parkingZoneId).stream().map(WorkerDemo::getWorkerId).collect(Collectors.toList())){
+                        workerRepository.findByWorkerId(workerId).getParkingZones().remove(parkingZone);
+                    }
                     for (Integer workerId : responsibleWorkers.stream().map(WorkerDemo::getWorkerId).collect(Collectors.toList())) {
                         Worker workerToAdd = workerRepository.findByWorkerId(workerId);
@@ -140,4 +145,6 @@
                         workerToAdd.getParkingZones().add(parkingZone);
                     }
+                }else{
+                    workerRepository.findAll().stream().filter(w->w.getParkingZones().contains(parkingZone)).forEach(w->w.getParkingZones().remove(parkingZone));
                 }
 
@@ -156,4 +163,5 @@
                 parkingZoneOpt.get().setParkingSpaces(null);
                 parkingZoneOpt.get().setParkingZoneLocation(null);
+                workerRepository.findAll().stream().filter(w->w.getParkingZones().contains(parkingZoneOpt.get())).forEach(w->w.getParkingZones().remove(parkingZoneOpt.get()));
                 parkingZoneRepository.deleteByPzId(parkingZoneId);
             } else {
Index: sources/app/src/main/java/parkup/services/WorkerService.java
===================================================================
--- sources/app/src/main/java/parkup/services/WorkerService.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/services/WorkerService.java	(revision 98f448a5217d1b04c85405d87889e64c1b6debb3)
@@ -31,12 +31,11 @@
     }
 
-    public List<WorkerDemo> getWorkers() {
-        return this.workerRepository.findAll().stream().map(WorkerDemo::new).collect(Collectors.toList());
+    public List<Worker> getWorkers() {
+        return this.workerRepository.findAll();
     }
 
     public WorkerDemoParkingZones findById(int workerId) {
         Worker worker = this.workerRepository.findByWorkerId(workerId);
-        WorkerDemoParkingZones workerToReturn = new WorkerDemoParkingZones(worker);
-        return workerToReturn;
+        return new WorkerDemoParkingZones(worker);
     }
 
@@ -103,5 +102,4 @@
         Optional<Worker> workerOpt = Optional.ofNullable(this.workerRepository.findByWorkerId(workerId));
         if (workerOpt.isPresent()) {
-
             if (email != null && email.length() > 1 && email.contains("@") ) {
                 List<String> emails = workerRepository.findAll().stream().map(Worker::getEmail).collect(Collectors.toList());
@@ -117,5 +115,5 @@
                 workerOpt.get().setPassword(bCryptPasswordEncoder.encode(password));
             }
-            workerOpt.get().setLocked(locked);
+            workerOpt.get().setAccount(locked);
 
             if (firstName != null && firstName.length() > 1 && !Objects.equals(workerOpt.get().getFirstName(), firstName)) {
