Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/controller/UserController.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/controller/UserController.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/controller/UserController.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -32,3 +32,4 @@
         return ResponseEntity.ok(usersService.search(userType, searchTerm, limit));
     }
+
 }
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AlbumService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AlbumService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AlbumService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -26,5 +26,5 @@
             throw new AlbumNotFoundException(id);
         }
-        Long currentUserId=authService.getCurrentUserID();
+        Long currentUserId=authService.getCurrentUserIDOptional().orElse(null);
 
         Album album=albumRepository.findById(id).orElseThrow(()->new AlbumNotFoundException(id));
@@ -44,5 +44,5 @@
 
     public List<MusicalEntityDto> searchAlbums(String searchTerm){
-        return albumRepository.searchAlbums(authService.getCurrentUserID(), searchTerm);
+        return albumRepository.searchAlbums(authService.getCurrentUserIDOptional().orElse(null), searchTerm);
     }
 
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/ArtistService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/ArtistService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/ArtistService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -9,17 +9,13 @@
 
 import java.util.List;
-import java.util.stream.Collectors;
 
 @Service
 @AllArgsConstructor
 public class ArtistService {
-
     private final ArtistContributionRepository artistContributionRepository;
-    private final AuthService authService;
 
 
     @Transactional(readOnly=true)
-    public List<ArtistContributionDto> getArtistContributions(Long artistId){
-        Long currentUserId=authService.getCurrentUserID();
+    public List<ArtistContributionDto> getArtistContributions(Long artistId, Long currentUserId){
         return artistContributionRepository.findContributionsByArtistId(currentUserId,artistId);
     }
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AuthService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AuthService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/AuthService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -5,4 +5,6 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.List;
+import java.util.Optional;
 import java.util.UUID;
 
@@ -123,4 +125,12 @@
     }
 
+    public Optional<Long> getCurrentUserIDOptional(){
+        Authentication authentication= SecurityContextHolder.getContext().getAuthentication();
+        if (authentication == null || !authentication.isAuthenticated()) {
+            return Optional.empty();
+        }
+        String username=authentication.getName();
+        return userRepository.findByUsername(username).map(User::getId);
+    }
 
     private User createNonAdminUser(AuthRequestDto authRequestDto) throws IOException {
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/FollowService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/FollowService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/FollowService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -55,5 +55,5 @@
         Long id=nonAdminUser.getId();
         List<Follow> followers = followRepository.findFollowersWithProfile(id);
-        Long currentUserId=authService.getCurrentUserID();
+        Long currentUserId=authService.getCurrentUserIDOptional().orElse(null);
 
 
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/NonAdminUserService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/NonAdminUserService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/NonAdminUserService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -41,7 +41,5 @@
     @Transactional(readOnly = true)
     public NonAdminUserDto getNonAdminUserProfile(String username) {
-
-        Long currentUserId= authService.getCurrentUserID();
-
+        Long currentUserId = authService.getCurrentUserIDOptional().orElse(null);
 
         Optional<Artist>artistOptional=artistRepository.findByUsername(username);
@@ -63,7 +61,8 @@
 
     private FollowStatusDto getFollowingInfo(Long id,Long currentUserId){
+
         Long followers = followRepository.countByFolloweeId(id);
         Long following = followRepository.countByFollowerId(id);
-        boolean isFollowing = followRepository.isFollowing(currentUserId, id);
+        boolean isFollowing = currentUserId != null && followRepository.isFollowing(currentUserId, id);
         return new FollowStatusDto(isFollowing,followers,following);
     }
@@ -72,5 +71,5 @@
         Long artistId=artist.getId();
 
-        List<ArtistContributionDto>artistContributionDtos=artistService.getArtistContributions(artistId);
+        List<ArtistContributionDto>artistContributionDtos=artistService.getArtistContributions(artistId, currentUserId);
         FollowStatusDto followStatusDto=getFollowingInfo(artistId,currentUserId);
 
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/PlaylistService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/PlaylistService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/PlaylistService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -35,5 +35,5 @@
 
     public PlaylistDto getPlaylist(Long id){
-        Long currentUserId=authService.getCurrentUserID();
+        Long currentUserId=authService.getCurrentUserIDOptional().orElse(null);
         Playlist playlist = playlistRepository.findById(id).orElseThrow(()-> new PlaylistNotFoundException(id));
         List<MusicalEntityDto>songsInPlaylist=songRepository.findSongsByPlaylistId(id,currentUserId);
Index: finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/SongService.java
===================================================================
--- finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/SongService.java	(revision 890e03619cf5c56f100d6777b2b0c3b589efbe80)
+++ finkwave/src/main/java/com/ukim/finki/develop/finkwave/service/SongService.java	(revision 0808ef26efb57d0c5a71b76eda63e14f669c93dc)
@@ -27,5 +27,5 @@
 
     public List<SongDto> searchSongs(String searchTerm){
-        Long userId = authService.getCurrentUserID();
+        Long userId = authService.getCurrentUserIDOptional().orElse(null);
         return songRepository.searchSongs(userId, searchTerm);
     }
@@ -36,11 +36,11 @@
     }
 
-    public MusicalEntityDto getSongById(Long songId){
-        Long userId = null;
-        try {
-            userId = authService.getCurrentUserID();
-        } catch (Exception ignored) {}
-        return songRepository.getSongById(songId, userId);
-    }
+//    public MusicalEntityDto getSongById(Long songId){
+//        Long userId = null;
+//        try {
+//            userId = authService.getCurrentUserID();
+//        } catch (Exception ignored) {}
+//        return songRepository.getSongById(songId, userId);
+//    }
 
     public SongDetailsDto getSongDetails(Long songId){
