title: Different landing page with MVC 4
body: <p>I'm using MVC 4 and having problems with the landing page.<br>
  I have two kinds of users (let's call the <code>FooUser</code> and <code>BarUser</code>)<br>
  Each of the users has it's own landing page:<br>
  <code>Foo/Index</code> and <code>Bar/Index</code><br>
  Once user logs in, I can identify whether he is Foo or Bar and redirect him to the relevant page.<br>
  But I still have a problem and that is when a user opens the main page. In this case the user doesn't perform a login action (since he is logged in from the previous session) so I can't redirect him to the relevant page.<br>
  Is there a way to set conditional defaults? something like:<br>
  (Any other ideas are most welcome)</p>
  
  <pre><code>if (IsCurrentUserFooUser()) //Have no idea how to get the current user at this point in the code
  {
      routes.MapRoute(
          name: "Default",
          url: "{controller}/{action}/{id}",
          defaults: new { controller = "Foo", action = "Index", id = UrlParameter.Optional });
  }
  else
  {
      routes.MapRoute(
          name: "Default",
          url: "{controller}/{action}/{id}",
          defaults: new { controller = "Bar", action = "Index", id = UrlParameter.Optional });
  }
  </code></pre>