Index: FullyStocked/src/main/java/com/bazi/fullystocked/Filter/LoginFilter.java
===================================================================
--- FullyStocked/src/main/java/com/bazi/fullystocked/Filter/LoginFilter.java	(revision 72254431498e88f5e85e5411b7393e364e82cca4)
+++ FullyStocked/src/main/java/com/bazi/fullystocked/Filter/LoginFilter.java	(revision 72254431498e88f5e85e5411b7393e364e82cca4)
@@ -0,0 +1,40 @@
+package com.bazi.fullystocked.Filter;
+
+import com.bazi.fullystocked.Models.User;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebFilter
+public class LoginFilter implements Filter {
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+
+    }
+
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+
+        HttpServletRequest request = (HttpServletRequest) servletRequest;
+        HttpServletResponse response = (HttpServletResponse) servletResponse;
+
+        User user = (User)request.getSession().getAttribute("user");
+
+        String path = request.getServletPath();
+
+        if (!"/".equals(path) && !"/home".equals(path) && !"/register".equals(path) && !"/login".equals(path) && user==null) {
+            response.sendRedirect("/login");
+        } else {
+            filterChain.doFilter(servletRequest,servletResponse);
+        }
+
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+}
Index: FullyStocked/src/main/java/com/bazi/fullystocked/FullyStockedApplication.java
===================================================================
--- FullyStocked/src/main/java/com/bazi/fullystocked/FullyStockedApplication.java	(revision c579aefa58aa2ca001be92291348869a0e661dc7)
+++ FullyStocked/src/main/java/com/bazi/fullystocked/FullyStockedApplication.java	(revision 72254431498e88f5e85e5411b7393e364e82cca4)
@@ -3,4 +3,5 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.context.annotation.Bean;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -8,4 +9,5 @@
 
 @SpringBootApplication
+@ServletComponentScan
 public class FullyStockedApplication {
 
Index: FullyStocked/src/main/resources/templates/login.html
===================================================================
--- FullyStocked/src/main/resources/templates/login.html	(revision c579aefa58aa2ca001be92291348869a0e661dc7)
+++ FullyStocked/src/main/resources/templates/login.html	(revision 72254431498e88f5e85e5411b7393e364e82cca4)
@@ -25,5 +25,8 @@
                     <button type="submit" class="btn btn-primary btn-lg btn-block">Најави се</button>
 
+
+
                 </form>
+                <p>Немаш профил? <a href="/register" class="link-info">Регистрирај сe тука!</a></p>
             </div>
         </div>
Index: FullyStocked/src/main/resources/templates/register.html
===================================================================
--- FullyStocked/src/main/resources/templates/register.html	(revision c579aefa58aa2ca001be92291348869a0e661dc7)
+++ FullyStocked/src/main/resources/templates/register.html	(revision 72254431498e88f5e85e5411b7393e364e82cca4)
@@ -71,5 +71,5 @@
 
                 </form>
-
+                <p class="d-flex justify-content-center">Веќе имаш профил? <a href="/login" class="link-info"> Најави сe тука!</a></p>
               </div>
               <div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2">
