So I am using the SignalR to create a chat application. I have a single page chat working Ok, but I need to implement the login so that only users can chat, and non-users get redirected to login page. Basically if you don't have a login I want you only to be able to get to the login page.
This tutorial shows how to setup login, but it doesn't go into how to restrict access to pages.
Bonus points if you point me in the right direction for grabbing the username from JavaScript for the chat.