MVC 5 ASP.Net FORM submit() function not working
<p>I am trying to get a login form to work using the below method. I am using JQuery version 1.12.0 and MVC5. i just create a accounts controller, when the admin login in, he/she can do CRUD functionality, others users can just see the posts and comments and nothings, but the login page not working means when I press Login nothing happens. The page does not refresh. It behaves as is I am clicking nothing
<strong>this is login view</strong></p>

<pre><code>@model string

@{
  ViewBag.Title = "Login";
 }

 @section ExtraHeaders
  {
  &lt;script src="@Url.Content("~/Scripts/Login.js")" type="text/javascript&lt;/script&gt;
&lt;script src="@Url.Content("~/Scripts/SHA256.js")" type="text/javascript&lt;/script&gt;
 }

 &lt;form action="@Href("~/Accounts/Login")" method="post" id="loginForm"&gt;
  &lt;input type="text" name="name" id="name"/&gt; Name &lt;br /&gt;
  &lt;input type="password" name="password" id="password"/&gt; Password &lt;br /&gt;
  &lt;input type="hidden"  name="nonce" id="nonce" value="@Model"/&gt;
  &lt;input type="hidden"  name="hash" id="hash" value="hash"/&gt;
  &lt;input type="button" onclick="getPasswordHash('password', 'nonce','hash'); $('#loginForm').submit();" value="Login"/&gt;
 &lt;/form&gt;
</code></pre>

<p><strong>this is login js file code</strong></p>

<pre><code>function getPasswordHash (passwordElement, nonceElement, hashElement)
{
   var password = $('#' + passwordElement).attr('value');
  var nonce = $('#' + nonceElement).attr('value');
  $('#' + hashElement).attr('value', $.sha256(password + nonce));
  $('#' + passwordElement).attr('value', '');

 }
</code></pre>

<p><strong>this is account controller for login</strong></p>

<pre><code>private BlogModel model= new BlogModel();

    public ActionResult Login(string name, string hash)
    {
        if(string.IsNullOrWhiteSpace(hash))

        {
            Random random = new Random();
            byte[] randomData = new byte[sizeof(long)];
            random.NextBytes(randomData);
            string newNonce = BitConverter.ToInt64(randomData, 0).ToString("X16");
            Session["Nonce"] = newNonce;
            return View(model: newNonce);

        }

        Administrator admin = model.Administrators.Where(x =&gt; x.Name == name).FirstOrDefault();
        string nonce = Session["Nonce"] as string;
        if(admin == null || string.IsNullOrWhiteSpace(nonce))
        {
            return RedirectToAction("Index", "Posts");

        }
        string computedHash;
        using (SHA256 sha256 = SHA256.Create()) //sha256
        {
            byte[] hashInput = Encoding.ASCII.GetBytes(admin.Password + nonce);
            byte[] hashData = sha256.ComputeHash(hashInput);
            StringBuilder stringBuidler= new StringBuilder();
            foreach(byte value in hashData)
            {
                stringBuidler.AppendFormat("{0:X2}", value);

            }
            computedHash = stringBuidler.ToString();

        }
        Session ["IsAdmin"]= (computedHash.ToLower() == hash.ToLower());
        return RedirectToAction("Index","Posts");
    }


    public ActionResult Logout()
    {
        Session["Nonce"] = null;
        Session["IsAdmin"] = null;
        return RedirectToAction("Index", "Posts");

    }
    public ActionResult Index()
    {
        return View();
    }
</code></pre>

<p>EDIT: getPasswordHash when i right click on its definition, it tell me "failed" 
 either because  the caret is already at the definition or because  an explicit definition could not be found</p>