public IActionResult Login([FromBody] LoginInputModel model)
        {
            var user = _userService.ReadAllUsers().FirstOrDefault(u => u.Username == model.Username);

            // check if username exists
            if (user == null)
            {
                return(Unauthorized());
            }

            // check if password is correct
            if (!_authenticationHelper.VerifyPasswordHash(model.Password, user.PasswordHash, user.PasswordSalt))
            {
                return(Unauthorized());
            }

            // Authentication successful
            return(Ok(new
            {
                username = user.Username,
                user.IsAdmin,
                token = _authenticationHelper.GenerateToken(user)
            }));
        }