public HttpResponseMessage GetLoginPolicies(string ipAddress)
        {
            var dateStart = DateTime.Now;

            _performancelog.Debug($"Start,PolicyController,GetLoginPolicies,{string.Empty},{DateTime.Now:hh.mm.ss.ffffff}");

            ErrorMessage error;
            string       message;
            var          posId = _loginManager.Authenticate(ipAddress, out message, out error);

            if (!string.IsNullOrEmpty(error.MessageStyle.Message))
            {
                _performancelog.Debug($"End,PolicyController,GetLoginPolicies,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");
                return(Request.CreateResponse(
                           error.StatusCode,
                           new InvalidLoginReponseModel
                {
                    Error = error.MessageStyle,
                    ShutDownPOS = error.ShutDownPos
                }));
            }

            if (posId == 0)
            {
                var offSet = _policyManager.LoadStoreInfo().OffSet;
                _performancelog.Debug($"End,PolicyController,GetLoginPolicies,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");
                return(Request.CreateResponse(
                           HttpStatusCode.Unauthorized,
                           new InvalidLoginReponseModel
                {
                    Error = new MessageStyle {
                        Message = _resourceManager.GetResString(8198, offSet)
                    },
                    ShutDownPOS = error.ShutDownPos
                }));
            }

            if (!_tillManager.IsActiveTillAvailable(posId, out error))
            {
                _performancelog.Debug($"End,PolicyController,GetLoginPolicies,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");
                return(Request.CreateResponse(
                           error.StatusCode,
                           new InvalidLoginReponseModel
                {
                    Error = error.MessageStyle,
                    ShutDownPOS = error.ShutDownPos
                }));
            }

            var policies = _policyManager.GetLoginPolicies(ipAddress, posId);

            _performancelog.Debug($"End,PolicyController,GetLoginPolicies,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}");

            return(Request.CreateResponse(HttpStatusCode.OK, new
            {
                policies,
                message
            }));
        }