Index: frontend/GlobeGuru-frontend/.idea/.gitignore
===================================================================
--- frontend/GlobeGuru-frontend/.idea/.gitignore	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
+++ frontend/GlobeGuru-frontend/.idea/.gitignore	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
Index: frontend/GlobeGuru-frontend/.idea/GlobeGuru-frontend.iml
===================================================================
--- frontend/GlobeGuru-frontend/.idea/GlobeGuru-frontend.iml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
+++ frontend/GlobeGuru-frontend/.idea/GlobeGuru-frontend.iml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
Index: frontend/GlobeGuru-frontend/.idea/misc.xml
===================================================================
--- frontend/GlobeGuru-frontend/.idea/misc.xml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
+++ frontend/GlobeGuru-frontend/.idea/misc.xml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+</project>
Index: frontend/GlobeGuru-frontend/.idea/modules.xml
===================================================================
--- frontend/GlobeGuru-frontend/.idea/modules.xml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
+++ frontend/GlobeGuru-frontend/.idea/modules.xml	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/GlobeGuru-frontend.iml" filepath="$PROJECT_DIR$/.idea/GlobeGuru-frontend.iml" />
+    </modules>
+  </component>
+</project>
Index: frontend/GlobeGuru-frontend/public/index.html
===================================================================
--- frontend/GlobeGuru-frontend/public/index.html	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
+++ frontend/GlobeGuru-frontend/public/index.html	(revision d4d8f6155e80421fe9fc8c1ee34e0b784226b96c)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+    <div class="searchBar">
+        <form action="" method="POST">
+            <label>Дестинација</label>
+            <input type="text">
+            <label>Датум на поаѓање</label>
+            <input type="date">
+            <label>Број на луѓе</label>
+            <input type="number">
+            <input type="submit">
+        </form>
+    </div>
+<div class="givenOptions">
+    <!-- populated with JS response -->
+</div>
+</body>
+</html>
Index: frontend/admin-panel.html
===================================================================
--- frontend/admin-panel.html	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,106 +1,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Admin Panel</title>
-    <style>
-        body {
-            font-family: Arial, sans-serif;
-            background-color: #f0f0f0;
-            padding: 20px;
-        }
-        .container {
-            max-width: 600px;
-            margin: 0 auto;
-            padding: 20px;
-            background-color: #fff;
-            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-        }
-        h1 {
-            text-align: center;
-        }
-        button {
-            display: block;
-            width: 100%;
-            padding: 10px;
-            margin: 10px 0;
-            background-color: #4CAF50;
-            color: #fff;
-            border: none;
-            cursor: pointer;
-            font-size: 16px;
-        }
-        button:hover {
-            background-color: #45a049;
-        }
-        .info {
-            margin: 20px 0;
-        }
-        #warning {
-            display: none;
-            position: fixed;
-            top: 50%;
-            left: 50%;
-            transform: translate(-50%, -50%);
-            padding: 20px;
-            background-color: #fff;
-            box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
-            z-index: 1000;
-            text-align: center;
-        }
-        #warning h1 {
-            color: red;
-            margin-bottom: 10px;
-        }
-        #warning p {
-            margin: 10px 0;
-            font-weight: bold;
-        }
-        #confirmDrop {
-            background-color: red;
-            color: #fff;
-            border: none;
-            padding: 10px;
-            margin: 10px 5px;
-            cursor: pointer;
-        }
-        #cancel {
-            background-color: #4CAF50;
-            color: #fff;
-            border: none;
-            padding: 10px;
-            margin: 10px 5px;
-            cursor: pointer;
-        }
-        #confirmDrop:hover {
-            background-color: darkred;
-        }
-        #cancel:hover {
-            background-color: #45a049;
-        }
-    </style>
-</head>
-<body>
-<div class="container">
-    <h1>Admin Panel</h1>
-    <button id="logoutButton">Logout</button>
-    <button onclick="window.location.href='index.html'">Go to Website</button>
-    <button id="startScraperButton">Update Options</button>
-    <div class="info">
-        <h2>Update Info</h2>
-        <p><strong>Time since last update:</strong> <span id="lastUpdateTime">Calculating...</span></p>
-        <p><strong>Current number of options:</strong> <span id="currentOptionsCount">Fetching...</span></p>
-    </div>
-    <button id="dropOptionsDb" style="background-color: red" onclick="popupConfirm()">DROP OPTION DATABASE</button>
-
-</div>
-<div class="container" id="warning">
-    <h1>WARNING</h1>
-    <p><strong>This deletes all options stored in the database!</strong></p>
-    <p><strong>Are you sure?</strong></p>
-    <button id="confirmDrop" onclick="confirmDrop()">DROP DATABASE</button>
-    <button id="cancel" onclick="popupClose()">CANCEL</button>
-</div>
-<script src="js/AdminPanel.js"></script>
-</body>
-</html>
Index: frontend/css.css
===================================================================
--- frontend/css.css	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,403 +1,0 @@
-body {
-    font-family: Arial, sans-serif;
-    background-color: #f4f4f9;
-    color: #333;
-    margin: 0;
-    padding: 0;
-    display: flex;
-    height: 100vh;
-    overflow: hidden; /* Add this to prevent body overflow */
-}
-
-.top-right {
-    position: absolute;
-    top: 20px;
-    right: 20px;
-}
-.infoDiv{
-    width:400px;
-}
-.login-button {
-    background-color: #007bff;
-    color: white;
-    border: none;
-    padding: 10px 20px;
-    border-radius: 5px;
-    cursor: pointer;
-    transition: background-color 0.3s;
-}
-
-.login-button:hover {
-    background-color: #0056b3;
-}
-
-.sidebar {
-    width: 300px;
-    background-color: #ffffff;
-    padding: 20px;
-    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: space-evenly;
-    box-sizing: border-box;
-}
-
-.logo {
-    margin-bottom: 20px;
-}
-
-.logo img {
-    max-width: 100%;
-    height: auto;
-}
-
-.searchBar {
-    width: 100%;
-}
-
-.searchBar form {
-    display: flex;
-    flex-direction: column;
-}
-
-.searchBar label {
-    margin: 10px 0 5px;
-    font-weight: bold;
-}
-
-.searchBar input[type="text"],
-.searchBar input[type="date"],
-.searchBar input[type="number"] {
-    border: 1px solid #ccc;
-    border-radius: 5px;
-    padding: 10px;
-    font-size: 16px;
-    width: 100%;
-    margin-bottom: 20px;
-    box-sizing: border-box;
-}
-
-.searchBar input[type="submit"] {
-    background-color: #007bff;
-    color: #fff;
-    border: none;
-    border-radius: 5px;
-    padding: 10px;
-    font-size: 16px;
-    cursor: pointer;
-    transition: background-color 0.3s ease;
-}
-
-.searchBar input[type="submit"]:hover {
-    background-color: #0056b3;
-}
-
-.content {
-    flex: 1;
-    padding: 20px;
-    overflow-y: auto;
-    overflow-x: hidden; /* Add this to prevent horizontal overflow */
-    box-sizing: border-box;
-}
-
-#givenOptions {
-    width: 100%;
-    margin-top: 20px;
-    padding: 20px;
-    border-radius: 10px;
-    box-sizing: border-box;
-}
-
-.option {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100%;
-    border: 1px solid #ccc;
-    border-radius: 10px;
-    margin-bottom: 20px;
-    padding: 20px;
-    box-sizing: border-box;
-    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-    background-color: #f4f4f9;
-    overflow-x: auto; /* Add this to handle overflow within option */
-}
-.btnWrapper{
-    display: flex;
-    flex-direction: column;
-    justify-content: space-evenly;
-}
-
-.favBtn{
-    display: none;
-}
-.image {
-    width: 100%;
-    max-width: 300px;
-    height: auto;
-    border-radius: 10px;
-    margin-bottom: 15px;
-}
-
-.option-details {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    width: calc(100% - 300px); /* Adjust width to fit within option */
-    box-sizing: border-box;
-}
-
-p, h1, h2 {
-    margin: 0;
-    padding: 5px 0;
-    text-align: center;
-}
-
-h1 {
-    font-size: 24px;
-    font-weight: bold;
-}
-
-h2 {
-    font-size: 20px;
-    color: #007bff;
-}
-
-.country {
-    font-size: 18px;
-    color: #555;
-}
-
-.price {
-    font-size: 22px;
-    font-weight: bold;
-    color: #e74c3c;
-}
-
-.loading-overlay {
-    position: fixed;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background-color: rgba(255, 255, 255, 0.8);
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    z-index: 1000;
-    display: none;
-}
-
-.loading-content {
-    text-align: center;
-}
-
-.spinner {
-    border: 8px solid #f3f3f3;
-    border-top: 8px solid #3498db;
-    border-radius: 50%;
-    width: 60px;
-    height: 60px;
-    animation: spin 2s linear infinite;
-}
-
-@keyframes spin {
-    0% { transform: rotate(0deg); }
-    100% { transform: rotate(360deg); }
-}
-
-
-.popup {
-    display: none;
-    position: fixed;
-    z-index: 1000;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    overflow: auto;
-    background-color: rgba(0, 0, 0, 0.4);
-}
-
-.popup-content {
-    background-color: #fff;
-    margin: 15% auto;
-    padding: 20px;
-    border: 1px solid #888;
-    width: 80%;
-    max-width: 400px;
-    border-radius: 10px;
-    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
-    text-align: center;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-}
-
-.close {
-    color: #aaa;
-    align-self: flex-end;
-    font-size: 28px;
-    font-weight: bold;
-    cursor: pointer;
-    margin-bottom: 10px;
-}
-
-.close:hover,
-.close:focus {
-    color: black;
-    text-decoration: none;
-}
-
-form {
-    width: 100%;
-}
-
-form label {
-    margin: 10px 0 5px;
-    font-weight: bold;
-    width: 100%;
-    text-align: left;
-}
-
-form input[type="email"],
-form input[type="password"],
-form input[type="text"] {
-    width: 100%;
-    padding: 10px;
-    margin-bottom: 20px;
-    border: 1px solid #ccc;
-    border-radius: 5px;
-    box-sizing: border-box;
-    font-size: 16px;
-}
-
-.button {
-    width: 100%;
-    padding: 10px;
-    margin: 10px 0;
-    background-color: #007bff;
-    color: white;
-    border: none;
-    border-radius: 5px;
-    cursor: pointer;
-    font-size: 16px;
-    transition: background-color 0.3s;
-}
-
-.button:hover {
-    background-color: #0056b3;
-}
-
-.button[type="button"] {
-    background-color: #dd4b39;
-}
-
-.button[type="button"]:hover {
-    background-color: #c23321;
-}
-
-form p {
-    margin-top: 20px;
-    text-align: center;
-}
-
-form a {
-    color: #007bff;
-}
-
-form a:hover {
-    color: #0056b3;
-}
-
-/* Response Messages */
-.response {
-    margin-top: 10px;
-    color: red;
-}
-
-.accDetails {
-    display: none;
-}
-.overlay {
-    display: none;
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-color: rgba(0, 0, 0, 0.7);
-    z-index: 1000;
-}
-
-.overlay-content {
-    position: relative;
-    margin: 5% auto;
-    padding: 20px;
-    width: 80%;
-    max-width: 1000px;
-    background-color: #fff;
-    display: flex;
-    justify-content: space-between;
-}
-
-.close {
-    position: absolute;
-    top: 10px;
-    right: 25px;
-    color: #aaa;
-    font-size: 35px;
-    font-weight: bold;
-    cursor: pointer;
-}
-
-.close:hover,
-.close:focus {
-    color: #000;
-    text-decoration: none;
-    cursor: pointer;
-}
-
-.saved-trips-container,
-.price-changes-container {
-    width: 48%;
-    overflow-y: auto;
-    max-height: 600px;
-}
-
-h2 {
-    text-align: center;
-}
-
-#savedTripsList,
-#priceChangesList {
-    list-style-type: none;
-    padding: 0;
-}
-
-#savedTripsList .option,
-#priceChangesList .price-change {
-    padding: 10px;
-    margin: 10px 0;
-    border: 1px solid #ccc;
-    border-radius: 5px;
-    background-color: #f4f4f9;
-}
-.btn {
-    margin: 15px;
-    width: 200px;
-    height: 30px;
-    background-color: #007bff;
-    color: white;
-    border: none;
-    border-radius: 5px;
-    cursor: pointer;
-    transition: background-color 0.3s;
-}
-
-.btn:disabled {
-    background-color: grey;
-    cursor: not-allowed;
-    opacity: 0.65;
-}
Index: frontend/index.html
===================================================================
--- frontend/index.html	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,131 +1,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta http-equiv="Cross-Origin-Opener-Policy" content="unsafe-none">
-
-    <title>GlobeGuru</title>
-    <link rel="stylesheet" href="css.css">
-    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-    <link rel="icon" type="image/x-icon" href="images/GLOBE.png">
-</head>
-<body>
-<div id="g_id_onload"
-     data-client_id="376204422797-s8f05nn6drmec1cko2h4kg1nk24abgc9.apps.googleusercontent.com"
-     data-context="signin"
-     data-ux_mode="popup"
-     data-login_uri="http://localhost:8000/"
-     data-callback="handleCredentialResponse"
-     data-auto_prompt="false">
-</div>
-
-<div class="top-right">
-    <button id="loginButton" class="login-button" onclick="openLoginPopup()">Login</button>
-    <button id="logoutButton" class="login-button" style="display:none;" onclick="logout()">Logout</button>
-    <button id="adminPanelButton" class="login-button" style="display:none;" onclick="goToAdminPanel()">Admin Panel</button>
-</div>
-<div class="sidebar">
-    <div class="logo">
-        <img src="images/GLOBE.png" height="235" width="235"/>
-    </div>
-    <div class="searchBar">
-        <form id="form-id">
-            <label for="destination">Дестинација</label>
-            <input type="text" id="destination" name="destination" placeholder="Име на хотел/Град или Држава">
-            <label for="departureDate">Датум на поаѓање</label>
-            <input type="date" id="departureDate" name="departureDate">
-            <label for="Nights">Број на ноќи</label>
-            <input type="number" id="Nights" name="nightsNumber">
-            <label for="NumPeople">Број на лица</label>
-            <input type="number" id="NumPeople" name="numberPeople" min="0" max="4" value="0" placeholder="внесете 0 за без ограничување">
-            <input type="submit" class="button" value="Пребарај" >
-        </form>
-    </div>
-    <button id="savedTripsButton" style="display:none;" class="button">Зачувани патувања</button>
-    <button class="button" style="width: 50px; height: 50px; margin-right: auto; display: none;" onclick="openAccountDetails()" id="accBtn"> <i class="fa fa-light fa-user fa-2x"></i></button>
-</div>
-<div class="content">
-    <div id="givenOptions">
-        <!-- populated with JS response -->
-    </div>
-</div>
-<div id="savedTripsOverlay" class="overlay">
-    <div class="overlay-content">
-        <span class="close">&times;</span>
-        <div class="saved-trips-container">
-            <h2>Зачувани патувања</h2>
-            <div id="savedTripsList"></div>
-        </div>
-        <div class="price-changes-container">
-            <h2>Промени во понудата</h2>
-            <div id="priceChangesList"></div>
-        </div>
-    </div>
-</div>
-
-<div id="loginPopup" class="popup">
-    <div class="popup-content">
-        <span class="close" onclick="closeLoginPopup()">&times;</span>
-        <h2>Login</h2>
-        <form id="loginForm">
-            <label for="email">Email:</label>
-            <input type="email" id="email" name="email" required>
-            <label for="password">Password:</label>
-            <input type="password" id="password" name="password" autocomplete="on" required>
-            <button type="submit" class="button">Login</button>
-            <div class="g_id_signin"
-                 data-type="icon"
-                 data-shape="square"
-                 data-theme="filled_blue"
-                 data-text="signin_with"
-                 data-size="large" style="margin-left: auto;margin-right: auto;width: 44px;">
-            </div>
-            <p>Don't have an account? <a href="#" onclick="openRegisterPopup()">Register</a></p>
-        </form>
-        <div id="loginResponse" class="response"></div>
-    </div>
-</div>
-
-<div id="registerPopup" class="popup">
-    <div class="popup-content">
-        <span class="close" onclick="closeRegisterPopup()">&times;</span>
-        <h2>Register</h2>
-        <form id="registerForm">
-            <label for="username">Username:</label>
-            <input type="text" id="username" name="username" required>
-            <label for="email">Email:</label>
-            <input type="email" id="email-reg" name="email" required>
-            <label for="password">Password:</label>
-            <input type="password" id="pass-reg" name="password"  autocomplete="on" required>
-            <button type="submit" class="button">Register</button>
-        </form>
-        <div id="registerResponse" class="response"></div>
-    </div>
-</div>
-
-<div id="loadingOverlay" class="loading-overlay">
-    <div class="loading-content">
-        <div class="spinner"></div>
-        <p>Пребарувам. ве молиме почекајте...</p>
-    </div>
-</div>
-<div id="AccountDetailsOverlay" class="popup accDetails">
-    <div class="popup-content">
-        <h1>Мој профил</h1>
-        <div class="popup-content" style="display: none" id="confDel">
-            <div class="delete" >
-                <h1>Дали сте сигурни дека сакате да го избришете профилот?</h1>
-                <button onclick="deleteAccount()" class="button" id="confirmDelete" style="background-color: red">Да</button>
-                <button id="cancel" class="button" onclick="closeConfirmDelete()">Не</button>
-            </div>
-        </div>
-        <button class="button" style="background-color: red" id="deleteAcc" onclick="confirmDelete()">Избриши профил</button>
-    </div>
-</div>
-<script src="js/formHandler.js"></script>
-<script src="js/loginHandler.js"></script>
-<script src="js/siteFlow.js"></script>
-<script src="https://accounts.google.com/gsi/client" async defer></script>
-
-</body>
-</html>
Index: frontend/js/AdminPanel.js
===================================================================
--- frontend/js/AdminPanel.js	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,49 +1,0 @@
-document.getElementById('startScraperButton').addEventListener('click', function() {
-
-    fetch('/admin/start-scraper', { method: 'POST' })
-        .then(response => response.json())
-        .then(data => alert(data.message))
-        .catch(error => console.error('Error:', error));
-
-    fetchLastUpdateTime();
-});
-function popupConfirm(){
-    const div = document.getElementById('warning').style.display = 'block';
-}
-function popupClose(){
-    const div = document.getElementById('warning').style.display = 'none';
-}
-document.getElementById('confirmDrop').addEventListener('click', function() {
-
-    fetch('/admin/drop-db', {method: 'GET'}).then(r => alert("Database dropped")).catch(err => console.error(err));
-    popupClose();
-});
-function fetchLastUpdateTime() {
-    fetch('/admin/last-update-time')
-        .then(response => response.json())
-        .then(data => {
-            document.getElementById('lastUpdateTime').textContent = new Date(data.lastUpdateTime).toLocaleString();
-        })
-        .catch(error => console.error('Error fetching last update time:', error));
-}
-function fetchCurrentOptionsCount() {
-    fetch('/admin/current-options-count')
-        .then(response => response.json())
-        .then(data => {
-            document.getElementById('currentOptionsCount').textContent = data.currentOptionsCount;
-        })
-        .catch(error => console.error('Error fetching current options count:', error));
-}
-
-// Fetch data when the page loads
-document.addEventListener('DOMContentLoaded', function() {
-    fetchLastUpdateTime();
-    fetchCurrentOptionsCount();
-});
-
-
-document.getElementById('logoutButton').addEventListener('click', function() {
-    sessionStorage.removeItem('loggedIn');
-    sessionStorage.removeItem('userEmail');
-    window.location.href = 'index.html'; // Redirect
-});
Index: frontend/js/formHandler.js
===================================================================
--- frontend/js/formHandler.js	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,158 +1,0 @@
-document.addEventListener('DOMContentLoaded', function() {
-    const form = document.getElementById('form-id');
-    const loadingOverlay = document.getElementById('loadingOverlay');
-
-    form.addEventListener('submit', function(event) {
-        event.preventDefault();
-
-        const formData = new FormData(form);
-        const data = {};
-        let isValid = true;
-        let errorMessage = "";
-
-        formData.forEach((value, key) => {
-            data[key] = value;
-            if (key === "departureDate") {
-                const today = new Date();
-                const departureDate = new Date(value);
-                if (departureDate <= today) {
-                    isValid = false;
-                    errorMessage += "Датумот на поаѓање е грешен!.\n";
-                }
-            }
-            if (key === "destination" && !value) {
-                isValid = false;
-                errorMessage += "Внесете дестинација.\n";
-            }
-        });
-
-        if (!isValid) {
-            alert(errorMessage);
-            return;
-        }
-
-        loadingOverlay.style.display = 'flex';
-
-        fetch('/submit', {
-            method: 'POST',
-            headers: {
-                'Content-Type': 'application/json'
-            },
-            body: JSON.stringify(data)
-        })
-            .then(response => {
-                if (!response.ok) {
-                    throw new Error('Network response was not ok ' + response.statusText);
-                }
-                return response.json();
-            })
-            .then(data => {
-                loadingOverlay.style.display = 'none';
-                const dataList = document.getElementById('givenOptions');
-                dataList.innerHTML = '';
-
-                if (data.length === 0) {
-                    const wrapper = document.createElement('div');
-                    const text = document.createElement('p');
-                    text.textContent = "Не се пронајдени резултати за вашето пребарување!";
-                    wrapper.appendChild(text);
-                    dataList.appendChild(wrapper);
-                } else {
-                    data.forEach(item => {
-                        const optionDiv = document.createElement('div');
-                        optionDiv.classList.add('option');
-
-                        const img = document.createElement('img');
-                        img.classList.add('image');
-                        img.src = item.imgSrc || '';
-                        optionDiv.appendChild(img);
-                        const wrapperDiv = document.createElement('div');
-                        optionDiv.appendChild(wrapperDiv);
-
-                        const nameParagraph = document.createElement('p');
-                        nameParagraph.id = 'name';
-                        nameParagraph.textContent = item.hotelName || 'N/A';
-                        wrapperDiv.appendChild(nameParagraph);
-
-                        const countryParagraph = document.createElement('p');
-                        countryParagraph.id = 'country';
-                        countryParagraph.style.fontSize = '20px';
-                        countryParagraph.textContent = item.country || 'N/A';
-                        wrapperDiv.appendChild(countryParagraph);
-
-                        const dateParagraph = document.createElement('h2');
-                        dateParagraph.id = 'date';
-                        dateParagraph.textContent = item.dateRange || 'N/A';
-                        wrapperDiv.appendChild(dateParagraph);
-
-                        const peopleParagraph = document.createElement('p');
-                        peopleParagraph.id = 'numPeople';
-                        peopleParagraph.textContent = item.numPeople === 1 ? item.numPeople + " лице" : item.numPeople + " лица";
-                        wrapperDiv.appendChild(peopleParagraph);
-
-                        const priceHeading = document.createElement('h1');
-                        priceHeading.textContent = 'Цена:';
-                        wrapperDiv.appendChild(priceHeading);
-                        const priceParagraph = document.createElement('h2');
-                        priceParagraph.id = 'price';
-                        priceParagraph.textContent = (item.price || 0) + " EUR";
-                        wrapperDiv.appendChild(priceParagraph);
-
-                        const infoDiv = document.createElement('div');
-                        infoDiv.classList.add("infoDiv");
-                        const typeRoom = document.createElement('p');
-                        typeRoom.textContent = "Тип на соба: " + (item.type || 'N/A');
-                        infoDiv.appendChild(typeRoom);
-                        const plan = document.createElement('p');
-                        plan.textContent = "Услуга: " + (item.board || 'N/A');
-                        infoDiv.appendChild(plan);
-                        const amenities = document.createElement('p');
-                        amenities.textContent = item.amenities && item.amenities.length > 0 ? "Поволности: " + item.amenities : "Нема информации од агенцијата за вклучените поволности.";
-                        infoDiv.appendChild(amenities);
-                        optionDiv.appendChild(infoDiv);
-
-                        const changesDiv = document.createElement('div');
-                        item.changes.forEach(change => {
-                            const changeParagraph = document.createElement('p');
-                            changeParagraph.textContent = change.attribute + " changed from " + change.oldValue + " to " + change.newValue;
-                            changesDiv.appendChild(changeParagraph);
-                        });
-                        optionDiv.appendChild(changesDiv);
-
-                        const link = document.createElement('a');
-                        link.id = 'link';
-                        link.href = item.link || '#';
-                        link.target = '_blank';
-
-                        const button = document.createElement('button');
-                        button.classList.add('btn', 'login-button');
-                        button.textContent = 'Линк до страна';
-                        const btnWrapDiv = document.createElement('div');
-                        btnWrapDiv.classList.add('btnWrapper');
-                        const favBtn = document.createElement('button');
-                        favBtn.classList.add('favBtn', 'btn');
-                        favBtn.id = 'favBtnId';
-                        favBtn.textContent = 'Додадете во омилени';
-                        favBtn.setAttribute('data-option-id', item.id);
-                        favBtn.addEventListener('click', function () {
-                            const optionId = this.getAttribute('data-option-id');
-                            saveFavoriteOption(optionId);
-                        });
-
-                        btnWrapDiv.appendChild(link);
-                        link.appendChild(button);
-                        btnWrapDiv.appendChild(favBtn);
-
-                        optionDiv.appendChild(btnWrapDiv);
-                        dataList.appendChild(optionDiv);
-                    });
-                    console.log('Finished processing data.');
-                }
-                updateFavoriteButtons();
-            })
-            .catch(error => {
-                console.error('Error fetching data:', error);
-                loadingOverlay.style.display = 'none';
-            });
-    });
-});
Index: frontend/js/loginHandler.js
===================================================================
--- frontend/js/loginHandler.js	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,154 +1,0 @@
-document.addEventListener('DOMContentLoaded', function() {
-    const loginForm = document.getElementById('loginForm');
-    const registerForm = document.getElementById('registerForm');
-    const loginResponse = document.getElementById('loginResponse');
-    const registerResponse = document.getElementById('registerResponse');
-
-    checkSession();
-
-    loginForm.addEventListener('submit', function(event) {
-        event.preventDefault();
-
-        const email = loginForm.email.value;
-        const password = loginForm.password.value;
-
-        const data = {
-            email: email,
-            password: password
-        };
-
-        fetch('/account/login', {
-            method: 'POST',
-            headers: {
-                'Content-Type': 'application/json'
-            },
-            body: JSON.stringify(data)
-        })
-            .then(response => response.json())
-            .then(data => {
-                if (data.sessionId) {
-                    loginResponse.textContent = data.message;
-                    sessionStorage.setItem('loggedIn', 'true');
-                    sessionStorage.setItem('user', JSON.stringify(email));
-                    sessionStorage.setItem('isAdmin', data.isAdmin);
-                    document.cookie = `sessionId=${data.sessionId}; path=/`;
-                    showLoggedInState();
-                    closeLoginPopup();
-                } else {
-                    throw new Error(data.message);
-                }
-            })
-            .catch(error => {
-                showMessage('loginResponse', 'error', error.message);
-            });
-    });
-
-    registerForm.addEventListener('submit', function(event) {
-        event.preventDefault();
-
-        const username = registerForm.username.value;
-        const email = registerForm.email.value;
-        const password = registerForm.password.value;
-
-        const data = {
-            username: username,
-            email: email,
-            password: password
-        };
-
-        fetch('/account/register', {
-            method: 'POST',
-            headers: {
-                'Content-Type': 'application/json'
-            },
-            body: JSON.stringify(data)
-        })
-            .then(response => response.json())
-            .then(data => {
-                if (response.ok) {
-                    showMessage('registerResponse', 'success', data.message);
-                    closeRegisterPopup();
-                } else {
-                    throw new Error(data.message);
-                }
-            })
-            .catch(error => {
-                showMessage('registerResponse', 'error', error.message);
-            });
-    });
-});
-
-function checkSession() {
-    fetch('/account/session', {
-        method: 'GET',
-        credentials: 'include'
-    })
-        .then(response => response.json())
-        .then(data => {
-            if (data.loggedIn) {
-                sessionStorage.setItem('loggedIn', 'true');
-                sessionStorage.setItem('user', JSON.stringify(data.user));
-                sessionStorage.setItem('isAdmin', data.isAdmin);
-                showLoggedInState();
-            } else {
-                sessionStorage.clear();
-                showLoggedOutState();
-            }
-        })
-        .catch(error => {
-            console.error('Error checking session:', error);
-            sessionStorage.clear();
-            showLoggedOutState();
-        });
-}
-
-function logout() {
-    fetch('/account/logout', {
-        method: 'POST',
-        credentials: 'include'
-    })
-        .then(response => {
-            if (response.ok) {
-                sessionStorage.clear();
-                document.cookie = "sessionId=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
-                showLoggedOutState();
-            } else {
-                throw new Error('Logout failed');
-            }
-        })
-        .catch(error => {
-            console.error('Error logging out:', error);
-        });
-}
-
-
-function handleCredentialResponse(response) {
-    const email = JSON.parse(atob(response.credential.split('.')[1])).email;
-    fetch('/account/login', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify({ id_token: response.credential })
-    })
-        .then(response => response.json())
-        .then(data => {
-            if (data.sessionId) {
-                sessionStorage.setItem('loggedIn', 'true');
-                sessionStorage.setItem('user', JSON.stringify(email));
-                sessionStorage.setItem('isAdmin', data.isAdmin);
-                document.cookie = `sessionId=${data.sessionId}; path=/`;
-                showLoggedInState();
-                closeLoginPopup();
-            } else {
-                throw new Error(data.message);
-            }
-        })
-        .catch(error => {
-            console.error(error);
-            showMessage('loginResponse', 'error', 'Google login failed');
-        });
-}
-
-
-
Index: frontend/js/siteFlow.js
===================================================================
--- frontend/js/siteFlow.js	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,301 +1,0 @@
-function getUserDetails() {
-    return JSON.parse(sessionStorage.getItem('user'));
-}
-
-function deleteAccount() {
-    fetch('/delete-account', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify(getUserDetails())
-    })
-        .then(response => response.json())
-        .then(data => {
-            if (data.success) {
-                sessionStorage.clear();
-                logout();
-                alert('Account deleted successfully');
-            } else {
-                alert('Failed to delete account: ' + data.message);
-            }
-        })
-        .catch(error => {
-            console.error('Error:', error);
-            alert('Failed to delete account: ' + error.message);
-        });
-}
-
-function logout() {
-    sessionStorage.clear();
-    document.cookie = "sessionId=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
-    showLoggedOutState();
-    fetch('/account/logout', {
-        method: 'POST',
-        credentials: 'include'
-    });
-}
-
-function openAccountDetails() {
-    document.getElementById('AccountDetailsOverlay').style.display = 'block';
-}
-
-function confirmDelete() {
-    document.getElementById('confDel').style.display = 'block';
-}
-
-function closeConfirmDelete() {
-    document.getElementById('confDel').style.display = 'none';
-}
-
-function openLoginPopup() {
-    document.getElementById('loginPopup').style.display = 'block';
-}
-
-function closeLoginPopup() {
-    document.getElementById('loginPopup').style.display = 'none';
-}
-
-function openRegisterPopup() {
-    document.getElementById('registerPopup').style.display = 'block';
-}
-
-function closeRegisterPopup() {
-    document.getElementById('registerPopup').style.display = 'none';
-}
-
-function showLoggedInState() {
-    document.getElementById('loginButton').style.display = 'none';
-    document.getElementById('logoutButton').style.display = 'block';
-    document.getElementById('savedTripsButton').style.display = 'block';
-    document.getElementById('accBtn').style.display = 'block';
-
-    var style = document.createElement('style');
-    style.innerHTML = '.favBtn { display: block; }';
-    document.head.appendChild(style);
-
-    if (sessionStorage.getItem('isAdmin') === 'true') {
-        document.getElementById('adminPanelButton').style.display = 'block';
-    }
-}
-
-
-function showMessage(elementId, type, message) {
-    const element = document.getElementById(elementId);
-    if (!element) {
-        console.error(`Element with id ${elementId} not found`);
-        return;
-    }
-    element.textContent = message;
-    element.className = `message ${type}`;
-}
-
-
-function showLoggedOutState() {
-    document.getElementById('loginButton').style.display = 'block';
-    document.getElementById('logoutButton').style.display = 'none';
-    document.getElementById('savedTripsButton').style.display = 'none';
-    document.getElementById('accBtn').style.display = 'none';
-    var style = document.createElement('style');
-    style.innerHTML = '.favBtn { display: none; }';
-    document.head.appendChild(style);
-    document.getElementById('loginResponse').style.display = 'none';
-    document.getElementById('adminPanelButton').style.display = 'none';
-}
-
-function goToAdminPanel() {
-    window.location.href = '/admin-panel';
-}
-function showLoginFeedback(success, message) {
-    const loginResponse = document.getElementById('loginResponse');
-    loginResponse.textContent = message;
-    loginResponse.style.color = success ? 'green' : 'red';
-    loginResponse.style.display = 'block';
-}
-
-window.onclick = function(event) {
-    const loginPopup = document.getElementById('loginPopup');
-    const registerPopup = document.getElementById('registerPopup');
-    const accountPopup = document.getElementById('AccountDetailsOverlay');
-    if (event.target === loginPopup) {
-        loginPopup.style.display = 'none';
-    }
-    if (event.target === registerPopup) {
-        registerPopup.style.display = 'none';
-    }
-    if (event.target === accountPopup) {
-        accountPopup.style.display = 'none';
-    }
-}
-
-document.addEventListener('DOMContentLoaded', function() {
-    checkSession();
-
-    document.querySelectorAll('.favBtn').forEach(button => {
-        button.addEventListener('click', function() {
-            const optionId = this.getAttribute('data-option-id');
-            saveFavoriteOption(optionId);
-        });
-    });
-
-    document.getElementById('savedTripsButton').addEventListener('click', function() {
-        document.getElementById('savedTripsOverlay').style.display = 'block';
-        fetchSavedTrips();
-        //fetchPriceChanges();
-    });
-
-    document.querySelector('.close').addEventListener('click', function() {
-        document.getElementById('savedTripsOverlay').style.display = 'none';
-    });
-});
-
-
-function saveFavoriteOption(optionId) {
-    const mail = sessionStorage.getItem('user').replace(/^"|"$/g, '');
-    fetch('/save-favorite', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify({ optionId: optionId, user: mail })
-    })
-        .then(response => {
-            if (response.ok) {
-                return response.json();
-            }
-            throw new Error('Network response was not ok.');
-        })
-        .then(data => {
-            console.log('Option saved:', data);
-            updateFavoriteButtons();
-        })
-        .catch(error => {
-            console.error('Error:', error);
-        });
-}
-
-function updateFavoriteButtons() {
-    const mail = sessionStorage.getItem('user').replace(/^"|"$/g, '');
-    fetch('/get-saved-trips', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify({ userEmail: mail })
-    })
-        .then(response => response.json())
-        .then(data => {
-            // Extract the option IDs of saved trips
-            const savedOptionIds = data.savedTrips.map(trip => trip.id);
-
-            document.querySelectorAll('.favBtn').forEach(button => {
-                const optionId = parseInt(button.getAttribute('data-option-id'), 10);
-                if (savedOptionIds.includes(optionId)) {
-                    button.disabled = true;
-                    button.textContent = 'Зачувано';
-                } else {
-                    button.disabled = false;
-                    button.textContent = 'Додадете во омилени';
-                }
-            });
-        })
-        .catch(error => {
-            console.error('Error fetching saved options:', error);
-        });
-}
-
-function fetchSavedTrips() {
-    const userEmail = sessionStorage.getItem('user').replace(/^"|"$/g, '');
-    fetch('/get-saved-trips', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify({ userEmail: userEmail })
-    })
-        .then(response => response.json())
-        .then(data => {
-
-            const savedTripsList = document.getElementById('savedTripsList');
-            savedTripsList.innerHTML = '';
-            data.savedTrips.forEach(trip => {
-                const tripDiv = document.createElement('div');
-                tripDiv.classList.add('option');
-
-                const closeButton = document.createElement('button');
-                closeButton.classList.add('remove-option');
-                closeButton.textContent = '×';
-                closeButton.onclick = function() {
-                    removeFromSaved(trip.id);
-                };
-                tripDiv.appendChild(closeButton);
-
-                const hotelName = document.createElement('p');
-                hotelName.textContent = trip.hotelName;
-                const country = document.createElement('p');
-                country.textContent = trip.country;
-                const price = document.createElement('p');
-                price.textContent = trip.price + "€";
-
-                tripDiv.appendChild(hotelName);
-                tripDiv.appendChild(country);
-                tripDiv.appendChild(price);
-
-                // Add change indicator
-                if(trip.changes && trip.changes.length > 0) {
-                    const changeDiv = document.createElement('div');
-                    changeDiv.classList.add('changes');
-                    trip.changes.forEach(change => {
-                        const changeParagraph = document.createElement('p');
-                        changeParagraph.textContent = `${change.attribute} се смени од ${change.oldValue} во ${change.newValue}`;
-                        changeDiv.appendChild(changeParagraph);
-                    });
-                    tripDiv.appendChild(changeDiv);
-                }
-
-                savedTripsList.appendChild(tripDiv);
-            });
-
-            const priceChangesList = document.getElementById('priceChangesList');
-            priceChangesList.innerHTML = '';
-            const priceChanges = data.savedTrips.filter(trip => trip.priceChanged);
-            if (priceChanges.length > 0) {
-                priceChanges.forEach(change => {
-                    const changeDiv = document.createElement('div');
-                    changeDiv.classList.add('price-change');
-                    changeDiv.textContent = `Цената на ${change.hotelName} има промена од ${change.price}€ во ${change.newPrice}€`;
-                    priceChangesList.appendChild(changeDiv);
-                });
-            } else {
-                priceChangesList.textContent = "нема промена во зачуваните патувања.";
-            }
-        })
-        .catch(error => {
-            console.error('Error fetching saved trips:', error);
-        });
-}
-
-function removeFromSaved(optionId) {
-    const userEmail = sessionStorage.getItem('user').replace(/^"|"$/g, '');
-    fetch('/remove-from-saved', {
-        method: 'POST',
-        headers: {
-            'Content-Type': 'application/json'
-        },
-        body: JSON.stringify({ optionId: optionId, userEmail: userEmail })
-    })
-        .then(response => {
-            if (response.ok) {
-                return response.json();
-            }
-            throw new Error('Network response was not ok.');
-        })
-        .then(data => {
-            if (data.success) {
-                fetchSavedTrips();
-            }
-        })
-        .catch(error => {
-            console.error('Error:', error);
-        });
-}
Index: frontend/package.json
===================================================================
--- frontend/package.json	(revision df7f3908d4d04d0a62480f95b6d163db19795365)
+++ 	(revision )
@@ -1,6 +1,0 @@
-{
-  "name": "frontend",
-  "version": "1.0.0",
-  "dependencies": {
-  }
-}
