Put this code at the top of an ASP page and it will force someone to login. Recently had a particular page that needed to be checked to see if someone was logged in before it was displayed. We just needed it on this particular page and still had to allow anonymous users to this website! It worked so thought we would pass along!
<% Response.Status="401 Not Authorized" Response.End %>