Index: sources/app/src/main/java/parkup/configs/CustomAuthenticationFilter.java
===================================================================
--- sources/app/src/main/java/parkup/configs/CustomAuthenticationFilter.java	(revision b519b382af2bb45cc5496a323042f807a3c94a79)
+++ sources/app/src/main/java/parkup/configs/CustomAuthenticationFilter.java	(revision e8b107664cbbdab4c97fd805edc407b38456fe88)
@@ -5,5 +5,4 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-
 
 import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
@@ -17,4 +16,5 @@
 import org.springframework.web.bind.annotation.CrossOrigin;
 import parkup.entities.Administrator;
+import parkup.entities.Guest;
 import parkup.entities.RegisteredUser;
 import parkup.entities.Worker;
@@ -79,4 +79,12 @@
                 break;
             }
+            case "Guest":{
+                Guest user = (Guest) authentication.getAuthorities();
+                email = user.getEmail();
+                fullName="GuestUser";
+                id=user.getGuestId();
+                roles = user.getAuthorities();
+                break;
+            }
         }
         //TODO see if guest needs to go through authentication
Index: sources/app/src/main/java/parkup/configs/webConfigs/WebSecurityConfig.java
===================================================================
--- sources/app/src/main/java/parkup/configs/webConfigs/WebSecurityConfig.java	(revision b519b382af2bb45cc5496a323042f807a3c94a79)
+++ sources/app/src/main/java/parkup/configs/webConfigs/WebSecurityConfig.java	(revision e8b107664cbbdab4c97fd805edc407b38456fe88)
@@ -42,5 +42,5 @@
             auth.userDetailsService(workerService).passwordEncoder(bCryptPasswordEncoder);
             auth.userDetailsService(administratorService).passwordEncoder(bCryptPasswordEncoder);
-            auth.userDetailsService(guestService).passwordEncoder(bCryptPasswordEncoder);
+            auth.userDetailsService(guestService);
         }
 
Index: sources/app/src/main/java/parkup/services/GuestService.java
===================================================================
--- sources/app/src/main/java/parkup/services/GuestService.java	(revision b519b382af2bb45cc5496a323042f807a3c94a79)
+++ sources/app/src/main/java/parkup/services/GuestService.java	(revision e8b107664cbbdab4c97fd805edc407b38456fe88)
@@ -32,12 +32,12 @@
     }
 
-    public void addGuest(Guest guest) {
+    public Guest addGuest(Guest guest) {
         Optional<Guest> guestOpt = this.guestRepository.findGuestByEmail(guest.getEmail());
         if (guestOpt.isPresent()) {
             throw new IllegalStateException("Email already taken, try adding a guest with a different valid email address");
         } else {
-            double random = Math.random()*100;
-            guest.setPassword(passwordEncoder.encode(Double.toString(random)));
-            this.guestRepository.save(guest);
+            double random = Math.random()*10000;
+            guest.setPassword(Integer.toString((int)random));
+           return  this.guestRepository.save(guest);
         }
     }
Index: sources/app/src/main/java/parkup/services/ParkingSpaceService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingSpaceService.java	(revision b519b382af2bb45cc5496a323042f807a3c94a79)
+++ sources/app/src/main/java/parkup/services/ParkingSpaceService.java	(revision e8b107664cbbdab4c97fd805edc407b38456fe88)
@@ -9,7 +9,5 @@
 
 import javax.transaction.Transactional;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
@@ -75,4 +73,6 @@
             throw new IllegalStateException("ParkingSpace does not exist");
         }
+
+
     }
 
Index: sources/app/src/main/java/parkup/services/RegisteredUserService.java
===================================================================
--- sources/app/src/main/java/parkup/services/RegisteredUserService.java	(revision b519b382af2bb45cc5496a323042f807a3c94a79)
+++ sources/app/src/main/java/parkup/services/RegisteredUserService.java	(revision e8b107664cbbdab4c97fd805edc407b38456fe88)
@@ -166,5 +166,5 @@
     public String deleteTablica(int regParkId, String plate) {
         RegisteredUser user = registeredUserRepository.findByRegParkId(regParkId);
-        Plate p =plateRepository.findByPlate(plate);
+        Plate p = plateRepository.findByPlate(plate);
         user.getPlates().remove(p);
         return plate;
