AuthorizationFilter

Tags: #<Tag:0x00007faff5298b58>

Hello, i have an ASP.NET MVC Project and i use hangfire. I need to make security so that only users in role “Admin” can see the dashboard. When my implementation of IDashboardAuthorizationFilter returns false I see only 401 “Unauthorized” and i can`t see the ogin page, As a code i have this in Web.config :

<authentication mode="Forms">
  <forms loginUrl="~/Security/Index" protection="None" timeout="960" defaultUrl="/" />
</authentication>

My MVC Controller has attribute [AllowAnonymous]
I Will use Owin cookie authentication but since I can`t see login page what should I do?