title: Login session in React
body: <p>I'm creating a portal in React, and I need to allow login/logout of users, where if you are logged you can see some pages, otherwise you can't.</p>
  
  <p>So far I've thought about having a variable 'isLogged' in the state of each component which need the user to be logged to be seeen, and pass the variable in the props among the these components.
  Then, I saw I can also use the localStorage to save this variable (I'm ok with the fact that the user would remain logged as long as he will clear his chace).
  The question I have is: is this ok, or it is not the right way to manage the session user (also considering security issues)?
  If so, which is the correct one?</p>
  
  <p>If it's useful to know, I'm not using Redux, and probably the portal will exploit only https protocol.</p>