title: Show different Menu items if user is logged or not
body: <p>In my React-Admin app I want to be able to have pages that are only available to logged users and others to not logged users. And this needs to be shown in Menu too. If user is not logged there should only be visible in <code>&lt;Menu&gt;</code> pages that do not require authentication, but if he initiates session, pages that require authentication and those which don't should be visible in <code>&lt;Menu&gt;</code>.</p>
  
  <p>I've used <code>&lt;Authenticated&gt;</code>component in <code>&lt;Menu&gt;</code> for that but this redirects me to Login page if user is not authenticated and I don't want that. I want to have a set of custom pages including a home page which are available to all users and the <code>&lt;Resources&gt;</code> only available and reachable to authenticated ones.</p>
  
  <pre><code>const Menu = ({resources, onMenuClick, logout, hasDashboard, translate, ...props}) =&gt;{
  
   return &lt;div&gt;
     {hasDashboard &amp;&amp; &lt;DashboardMenuItem onClick={onMenuClick} translate={translate}/&gt;}
     &lt;MenuItemLink
       to="/toAllUsersPage"
       primaryText={translate('toAllUsersPage.title')}
       leftIcon={&lt;MapIcon /&gt;}
       onClick={onMenuClick}
     /&gt;
  
     &lt;Authenticated location={props.location}&gt;
       &lt;div&gt;
         {resources.map(resource =&gt; (
           &lt;MenuItemLink
             key={resource.name}
             to={`/${resource.name}`}
             primaryText={translate(`resources.${resource.name}.name`, { smart_count: 2 })}
             onClick={onMenuClick}
             leftIcon={ resource.icon ? &lt;resource.icon /&gt; : &lt;DefaultIcon /&gt; }
           /&gt;
         ))}
       &lt;/div&gt;
     &lt;/Authenticated&gt;
  
     &lt;MenuItemLink
       to="/login"
       primaryText={translate('login.name')}
       leftIcon={&lt;LoginIcon /&gt;}        
       onClick={onMenuClick}
     /&gt;       
   &lt;/div&gt;
  
  }
  </code></pre>
  
  <p>As was previously said this solution always redirects to Login Page, even if I try the URL to a page that should be available because <code>AUTH_CHECK</code> fails in authProvider in <code>Authenticated</code> component. And I can't a have <code>&lt;LoginButton&gt;</code> since <code>Authenticated</code> only render if authProvider promise resolves. I was previously using <code>isLoggedIn</code> in redux state but that only says if last <code>AUTH_CHECK</code> resolves successfully giving inconsistencies at page refresh.</p>
  
  <p>With this in mind is possible for <code>Authenticated</code> not redirect to Login page or redirect to a page of my choosing and/or can I have a LoginButton in Menu only visible when user is not logged?</p>