private void Application_BeginRequest(Object source, EventArgs e)
        {
            if (HttpContext.Current == null)
            {
                return;
            }

            var request  = new HttpRequestWrapper(HttpContext.Current.Request);
            var response = new HttpResponseWrapper(HttpContext.Current.Response);

            var cookieNames = new[] { CookieHelper.AssistedUserCookieName, CookieHelper.UserDataCookieName };

            foreach (var cookieName in cookieNames)
            {
                var data = request.GetCookieData <CookieUserData>(cookieName);

                if (data == null)
                {
                    continue;
                }

                var ticksElapsed = DateTime.Now.Ticks - data.Issued.Ticks;
                var halfTime     = FormsAuthentication.Timeout.Ticks / 2;

                if (ticksElapsed >= halfTime)
                {
                    data.Issued = DateTime.Now;

                    response.SetCookieData(cookieName, data);
                }
            }
        }