title: ASP.NET MVC4 Redirect to login page
body: <p>I'm creating a web application using ASP.NET MVC 4 and C#.</p>
  
  <p>I want all users to be logged in before using application.</p>
  
  <p>I'm using ASP.NET Membership with a custom database.</p>
  
  <p>One method is check if <code>Membership.GetUser()</code> is null or not in every function.</p>
  
  <p><strong>But isn't there any easier way than checking user login state in every function?</strong> (maybe checking in web.config, global.asax, etc...??)</p>