// GET: Login
        public ActionResult Index()
        {
            try
            {
                var    data     = Request.Form;
                string username = data["user"];
                string password = data["password"];

                if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password))
                {
                    var userAccount = AccountDAO.Authenticate(username, Utilities.Encryption.Security.MD5Encrypt(password));
                    if (userAccount != null)
                    {
                        SetAuthCookie(userAccount.AccountID, userAccount.AccountName);
                        return(RedirectToAction("Index", "Home"));
                    }
                }
            }catch (Exception ex)
            {
                NLogManager.PublishException(ex);
            }
            return(View());
        }