Index: KernelRecordsMVC.Web/Program.cs
===================================================================
--- KernelRecordsMVC.Web/Program.cs	(revision 08aefc6f3b51f4bfcb7471a2fd319c064171b1c5)
+++ KernelRecordsMVC.Web/Program.cs	(revision 595d2e58cf322a776ba1d3cedcb86e9bb2ee8093)
@@ -1,16 +1,82 @@
 using Microsoft.EntityFrameworkCore;
-using KernelRecordsMVC.Data;
+using Npgsql;
+using Npgsql.NameTranslation;
+using KernelRecordsMVC.Domain.Enums;
+using KernelRecordsMVC.Infrastructure.Data;
 
 var builder = WebApplication.CreateBuilder(args);
 
+// ==========================================
+// AUTHENTICATION
+// ==========================================
+
+builder.Services
+    .AddAuthentication("Cookies")
+    .AddCookie("Cookies", options =>
+    {
+        options.LoginPath = "/Account/Login";
+        options.AccessDeniedPath = "/Account/Login";
+        options.ExpireTimeSpan = TimeSpan.FromHours(8);
+        options.SlidingExpiration = true;
+    });
+
+builder.Services.AddAuthorization();
+
 builder.Services.AddControllersWithViews();
 
+// ==========================================
+// DATABASE
+// ==========================================
+
+var dataSourceBuilder = new NpgsqlDataSourceBuilder(
+    builder.Configuration.GetConnectionString("KernelRecords"));
+
+var nameTranslator = new NpgsqlNullNameTranslator();
+
+dataSourceBuilder.MapEnum<AdminType>(
+    "project.admin_type",
+    nameTranslator);
+
+dataSourceBuilder.MapEnum<ProductFormat>(
+    "project.product_format",
+    nameTranslator);
+
+dataSourceBuilder.MapEnum<PaymentMethodType>(
+    "project.payment_method_type",
+    nameTranslator);
+
+dataSourceBuilder.MapEnum<OrderStatusType>(
+    "project.order_status_type",
+    nameTranslator);
+
+dataSourceBuilder.MapEnum<ModificationType>(
+    "project.modification_type",
+    nameTranslator);
+
+dataSourceBuilder.MapEnum<ArtistReleaseType>(
+    "project.artist_release_type",
+    nameTranslator);
+
+var dataSource = dataSourceBuilder.Build();
+
 builder.Services.AddDbContext<KernelRecordsContext>(options =>
-    options.UseNpgsql(
-        builder.Configuration.GetConnectionString("KernelRecords")));
+    options.UseNpgsql(dataSource));
 
-builder.Services.AddSession();
+// ==========================================
+// SESSION
+// ==========================================
+
+builder.Services.AddSession(options =>
+{
+    options.IdleTimeout = TimeSpan.FromHours(2);
+    options.Cookie.HttpOnly = true;
+    options.Cookie.IsEssential = true;
+});
 
 var app = builder.Build();
+
+// ==========================================
+// MIDDLEWARE
+// ==========================================
 
 if (!app.Environment.IsDevelopment())
@@ -21,4 +87,5 @@
 
 app.UseHttpsRedirection();
+
 app.UseStaticFiles();
 
@@ -26,4 +93,6 @@
 
 app.UseSession();
+
+app.UseAuthentication();
 
 app.UseAuthorization();
