I have 2 roles admin and employee in my website and 2 layout.cshtml as well. In my \_viewstart.cshtml file 

```
@{
   if (!ReferenceEquals(Session["Role"], null))
    {
        if (Session["Role"].ToString() == "Admin")
        { Layout = "~/Views/Shared/_AdminLayout.cshtml"; }
        else
        { Layout = "~/Views/Shared/_EmployeeLayout.cshtml"; }

    }
   else
   {
       Response.Redirect("~/");
   }

}

```

Everything is working fine but the else part where if session is equal to null than i am redirecting to login page "~/". It is redirecting there also on the logon page but problem is that in the logon view i have some css link and script links when ever a request goes to server for script or .css file. server again redirect to the \_viewstart.cshtml and again all the process executing, and i am getting this error 

This webpage has a redirect loop
The webpage at localhost address has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

Please suggests me solution or let me know where I am wrong here in my code

1.Is \_viewstart.cshtml executes with every request not only with views ?
2. How can i remove this error?