diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/api/UserController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/api/UserController.cs
new file mode 100644
index 000000000..d2b97e13c
--- /dev/null
+++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/api/UserController.cs
@@ -0,0 +1,60 @@
+namespace LearningHub.Nhs.AdminUI.Controllers.Api
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using elfhHub.Nhs.Models.Common;
+ using elfhHub.Nhs.Models.Enums;
+ using LearningHub.Nhs.AdminUI.Interfaces;
+ using Microsoft.AspNetCore.Authorization;
+ using Microsoft.AspNetCore.Mvc;
+ using Microsoft.Extensions.Logging;
+ using Microsoft.Extensions.Options;
+
+ ///
+ /// The UserController class.
+ ///
+ [Authorize]
+ [Route("api/[controller]")]
+ [ApiController]
+ public class UserController : BaseApiController
+ {
+ ///
+ /// The elfh user service..
+ ///
+ private IUserService userService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The userService.
+ /// loginWizardService.
+ /// logger.
+ /// Settings.
+ public UserController(IUserService userService, ILogger logger)
+ : base(logger)
+ {
+ this.userService = userService;
+ }
+
+ ///
+ /// The SessionTimeout.
+ ///
+ /// The .
+ [HttpPost("browser-close")]
+ public IActionResult BrowserClose()
+ {
+ // Add browser close to the UserHistory
+ UserHistoryViewModel userHistory = new UserHistoryViewModel()
+ {
+ UserId = this.CurrentUserId,
+ UserHistoryTypeId = (int)UserHistoryType.Logout,
+ Detail = @"User browser closed",
+ };
+
+ this.userService.StoreUserHistory(userHistory);
+
+ return this.Ok(true);
+ }
+ }
+}
diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_Layout.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_Layout.cshtml
index d12be205a..aa098dc6a 100644
--- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_Layout.cshtml
+++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Shared/_Layout.cshtml
@@ -78,7 +78,14 @@
@**@
+
@RenderSection("Scripts", required: false)
+
+