private async Task <LabUser> GetOrCreateLabUserAsync(string email, string fullName, string teamName,
                                                             string location, string countryCode, string companyName)
        {
            var user = await _context.LabUsers.FirstOrDefaultAsync(u => u.EMail == email);

            if (user == null)
            {
                _logger.LogInformation("Creating user {email}", email);
                // Create the user if does not exist
                user = new LabUser
                {
                    EMail       = email,
                    FullName    = fullName,
                    TeamName    = teamName,
                    Location    = location,
                    CountryCode = countryCode,
                    CompanyName = companyName
                };
                _context.LabUsers.Add(user);
                await _context.SaveChangesAsync();
            }
            else // Check if the parameters are different from the stored ones
            {
                if (user.FullName != fullName || user.TeamName != teamName || user.CompanyName != companyName ||
                    user.Location != location || user.CountryCode != countryCode)
                {
                    _logger.LogInformation("Updating user {email}", email);
                    user.FullName    = fullName;
                    user.TeamName    = teamName;
                    user.CompanyName = companyName;
                    user.Location    = location;
                    user.CountryCode = countryCode;
                    _context.LabUsers.Update(user);
                    await _context.SaveChangesAsync();
                }
            }
            return(user);
        }