Index: reactapp/src/App.js
===================================================================
--- reactapp/src/App.js	(revision 8dffe022a42c8c6fdea90df3276eb16b6610b51f)
+++ reactapp/src/App.js	(revision ebc51762bbd1b4345d8908789af87bdc49aad058)
@@ -2,29 +2,41 @@
 import SearchResults from "./Pages/SearchResults";
 import Login from "./Pages/Login";
-import Registration from "./Pages/Registration";
 import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
-import Root from "./Components/Root";
+import Home from "./Pages/Home";
 import UserDashboard from "./Pages/UserDashboard";
-import Subject from "./Pages/Subject";
-import University from "./Pages/University";
-import Faculty from "./Pages/Faculty";
 import { useEffect, useState, useMemo } from "react";
 import AuthApi from "./api/AuthApi";
 import Cookies from "js-cookie";
-import NotFound from "./Pages/NotFound";
-import Topic from "./Pages/Topic";
-import LoadingSpinner from "./Components/Styled/LoadingSpinner.style";
-import Home from "./Pages/Home";
-import PublicUserProfile from "./Pages/PublicUserProfile";
+import axios from "./api/axios";
+import JSOG from "jsog";
 
 export default function App() {
   const [auth, setAuth] = useState(false);
+  const [user, setUser] = useState(null);
+  const [userLoaded, setUserLoaded] = useState(false);
   const variableAuth = useMemo(() => ({ auth, setAuth }), [auth]);
   const [authLoaded, setAuthLoaded] = useState(false);
+
+  const fetchUser = async () => {
+    try {
+      const response = await axios.get(
+        "http://192.168.0.17:8080/secure/currentUser",
+        { withCredentials: true }
+      );
+      var cyclicGraph = await response.data;
+      var jsogStructure = JSOG.encode(cyclicGraph);
+      cyclicGraph = JSOG.decode(jsogStructure);
+      setUser(cyclicGraph);
+      setUserLoaded(true);
+    } catch (error) {
+      console.log("Fetching error", error);
+    }
+  };
 
   const readCookie = async () => {
     const session = Cookies.get("JSESSIONID");
     if (session) {
-      setAuth(true);
+      setAuth(true); // go stava true ako postoi takvo cookie (zasto auth=false na sekoe renderiranje)
+      fetchUser();
     } else {
       setAuth(false);
@@ -34,5 +46,4 @@
 
   useEffect(() => {
-    document.title = "profesori.mk";
     readCookie();
   }, []);
@@ -45,5 +56,5 @@
       return children;
     } else {
-      return <LoadingSpinner/>;
+      return <div>се вчитува cookie...</div>;
     }
   };
@@ -53,25 +64,25 @@
       <BrowserRouter>
         <Routes>
-          <Route path="/" element={<Root />}>
-            <Route path="/" element={<Home/>}/>
+          <Route
+            path="/"
+            element={<Home user={user} userLoaded={userLoaded} />}
+          >
             <Route path="login" element={<Login />}></Route>
-            <Route path="registration" element={<Registration />}></Route>
             <Route path="professor">
-              <Route path=":professorId" element={<Professor />} />
+              <Route
+                path=":professorId"
+                element={<Professor user={user} userLoaded={userLoaded} />}
+              />
             </Route>
-            <Route path="university/:universityId" element={<University />} />
-            <Route path="user/:userId" element={<PublicUserProfile />} />
-            <Route path="faculty/:facultyId" element={<Faculty />} />
-            <Route path="subject/:subjectId" element={<Subject />} />
-            <Route path="topic/:topicId" element={<Topic />} />
             <Route path="search" element={<SearchResults />}></Route>
             <Route
               path="user_dashboard"
               element={
-                <ProtectedRoute auth={auth}>{<UserDashboard />}</ProtectedRoute>
+                <ProtectedRoute auth={auth}>
+                  {<UserDashboard user={user} userLoaded={userLoaded} />}
+                </ProtectedRoute>
               }
             ></Route>
           </Route>
-          <Route path="*" element={<NotFound />} />
         </Routes>
       </BrowserRouter>
