Index: PostgreSqlDotnetCore/Controllers/ErrorController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/ErrorController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/ErrorController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -2,16 +2,26 @@
 {
     using Microsoft.AspNetCore.Http;
+    using Microsoft.AspNetCore.Identity;
     using Microsoft.AspNetCore.Mvc;
+    using System.Threading.Tasks;
 
-    public class ErrorController : Controller
+    public class ErrorController : BaseController
     {
+        public ErrorController(UserManager<IdentityUser> userManager) : base(userManager)
+        {
+
+        }
         // GET: ErrorController
-        public IActionResult AccessDenied()
+        public async Task<IActionResult> AccessDeniedAsync()
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
             return View();
         }
         // GET: ErrorController
-        public IActionResult NotExist()
+        public async Task<IActionResult> NotExistAsync()
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
             return View();
         }
Index: PostgreSqlDotnetCore/Controllers/HomeController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/HomeController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/HomeController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -4,9 +4,10 @@
 using PostgreSqlDotnetCore.Models;
 using System.Diagnostics;
+using System.Web.Mvc;
 
 namespace PostgreSqlDotnetCore.Controllers
 {
 
-    public class HomeController : Controller
+    public class HomeController : BaseController
     {
         private ApplicationDbContext db = new ApplicationDbContext();
@@ -15,5 +16,5 @@
         private readonly ILogger<HomeController> _logger;
 
-        public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager)
+        public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager) : base(userManager)
         {
             _logger = logger;
@@ -56,18 +57,28 @@
                         db.SaveChanges();
                     }
-
+                    // set if is authenticated
+                    ViewBag.isAuthenticated = await getCrrentUser();
                 }
 
+            } else
+            {
+                ViewBag.isAuthenticated = null;
             }
             ViewBag.ShowTopBar = true;
+
             return View();
         }
 
-        public IActionResult Privacy()
+        public async Task<IActionResult> PrivacyAsync()
         {
+
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
             return View();
         }
-        public IActionResult Contact()
+        public async Task<IActionResult> ContactAsync()
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
             return View();
         }
Index: PostgreSqlDotnetCore/Controllers/JobsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/JobsController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/JobsController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -12,4 +12,6 @@
         public JobsController(UserManager<IdentityUser> userManager) : base(userManager)
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = new UsersClass();
         }
 
Index: PostgreSqlDotnetCore/Controllers/PetCaresController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/PetCaresController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/PetCaresController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -32,4 +32,6 @@
             // check for permission
             UsersClass customerClass = await getCrrentUser();
+            // set if is authenticated
+            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
Index: PostgreSqlDotnetCore/Controllers/PetsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/PetsController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/PetsController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -19,4 +19,7 @@
             // check for permission
             UsersClass customerClass = await getCrrentUser();
+
+            // set if is authenticated
+            ViewBag.isAuthenticated = customerClass;
             if (customerClass == null)
             {
@@ -62,7 +65,11 @@
         //}
 
-        public ActionResult Create()
+        public async Task<ActionResult> CreateAsync()
         {
-            
+
+            // check for permission
+            UsersClass customerClass = await getCrrentUser();
+            // set if is authenticated
+            ViewBag.isAuthenticated = customerClass;
             return View();
         }
@@ -78,9 +85,15 @@
             if (!isAuthenticated)
             {
+                // set if is authenticated
+                ViewBag.isAuthenticated = null;
                 return RedirectToAction("AccessDenied", "Error");
             }
+            ViewBag.isAuthenticated = new UsersClass();
+
             if (ModelState.IsValid)
             {
-               // peClass.dateofbirthday = DateTime.SpecifyKind(peClass.dateofbirthday, DateTimeKind.Utc);
+                // set if is authenticated
+                ViewBag.isAuthenticated = new UsersClass();
+                // peClass.dateofbirthday = DateTime.SpecifyKind(peClass.dateofbirthday, DateTimeKind.Utc);
                 var user = await _userManager.GetUserAsync(User);
                 var customerClass = db.CustomerObj.SingleOrDefault(x => x.email == user.Email);
@@ -121,6 +134,12 @@
             if (!isAuthenticated)
             {
+                // set if is authenticated
+                ViewBag.isAuthenticated = null;
                 return RedirectToAction("AccessDenied", "Error");
             }
+
+            // set if is authenticated
+            ViewBag.isAuthenticated = new UsersClass();
+            
              
             if (ModelState.IsValid)
Index: PostgreSqlDotnetCore/Controllers/ProductsController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/ProductsController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/ProductsController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -16,4 +16,6 @@
         public ProductsController(UserManager<IdentityUser> userManager) : base(userManager)
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = new UsersClass();
         }
 
@@ -28,4 +30,6 @@
         public ActionResult Index(string? searchString)
         {
+            // set if is authenticated
+            ViewBag.isAuthenticated = new UsersClass();
             if (!String.IsNullOrEmpty(searchString))
             {
@@ -67,4 +71,7 @@
             // check for permission
             UsersClass customerClass = await checkAuthorizationAsync();
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
+
             if (customerClass == null)
             {
@@ -100,14 +107,4 @@
         }
 
-
-
-
-
-
-
-
-
-
-
         // GET: Customer/Edit/5
         public async Task<ActionResult> EditAsync(int? id)
@@ -118,4 +115,7 @@
             }
             UsersClass customerClass = await checkAuthorizationAsync();
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
+
             if (customerClass == null)
             {
@@ -154,4 +154,7 @@
             }
             UsersClass customerClass = await checkAuthorizationAsync();
+            // set if is authenticated
+            ViewBag.isAuthenticated = await getCrrentUser();
+
             if (customerClass == null)
             {
Index: PostgreSqlDotnetCore/Controllers/VetCenterController.cs
===================================================================
--- PostgreSqlDotnetCore/Controllers/VetCenterController.cs	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Controllers/VetCenterController.cs	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -12,4 +12,7 @@
         public VetCenterController(UserManager<IdentityUser> userManager) : base(userManager)
         {
+
+            // set if is authenticated
+            ViewBag.isAuthenticated = new UsersClass();
         }
 
Index: PostgreSqlDotnetCore/Views/Shared/_Layout.cshtml
===================================================================
--- PostgreSqlDotnetCore/Views/Shared/_Layout.cshtml	(revision 8f8226c8dbb4aa7ecab93c2a9feb0b429fbf2f1c)
+++ PostgreSqlDotnetCore/Views/Shared/_Layout.cshtml	(revision 67821048db84782043d1d0806ae4b689a699b950)
@@ -13,4 +13,5 @@
 </head>
 <body>
+    <h1>@(ViewBag.isAuthenticated == null ? "krij" : "prikazi")</h1>
     <header>
         <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
@@ -26,22 +27,32 @@
                             <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                         </li>
-                        <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="Pets" asp-action="Index">Pets</a>
-                        </li>
+                        @{
+                            if (ViewBag.isAuthenticated != null)
+                            {
+                                <li class="nav-item">
+                                    <a class="nav-link text-dark" asp-area="" asp-controller="Pets" asp-action="Index">Pets</a>
+                                </li>
+                            }
+                        }
                         <li class="nav-item">
                             <a class="nav-link text-dark" asp-area="" asp-controller="Products" asp-action="Index">Products</a>
                         </li>
-                        <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="PetCares" asp-action="Index">Pet Cares</a>
-                        </li>
-                        <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="Customer" asp-action="Index">Manage Customers</a>
-                        </li>
-                        <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="City" asp-action="Index">Manage Cities</a>
-                        </li>
-                        <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="Blog" asp-action="Index">BlogPost</a>
-                        </li>
+                        @{
+                            if (ViewBag.isAuthenticated != null)
+                            {
+                                <li class="nav-item">
+                                    <a class="nav-link text-dark" asp-area="" asp-controller="PetCares" asp-action="Index">Pet Cares</a>
+                                </li>
+                                <li class="nav-item">
+                                    <a class="nav-link text-dark" asp-area="" asp-controller="Customer" asp-action="Index">Manage Customers</a>
+                                </li>
+                                <li class="nav-item">
+                                    <a class="nav-link text-dark" asp-area="" asp-controller="City" asp-action="Index">Manage Cities</a>
+                                </li>
+                                <li class="nav-item">
+                                    <a class="nav-link text-dark" asp-area="" asp-controller="Blog" asp-action="Index">BlogPost</a>
+                                </li>
+                            }
+                        }
                         <li class="nav-item">
                             <a class="nav-link text-dark" asp-area="" asp-controller="VetCenter" asp-action="Index">VetCenters</a>
