Add login route
See item 3. of #372 (closed).
I move the login UI under a /login
route. Here is the new behaviour:
- If the user does not have a
sessionId
, render the logged-out routes, that is:- a
/login
route that renders theLoginContainer
; - a default route that renders a
<Redirect />
to/login
-- this is how the user gets redirected to the login page after logging out.
- a
- If the user has a
sessionId
, render the logged-in routes, that is:- all the existing routes;
- a new
/login
route that renders a<Redirect />
to/
-- this is how the user gets redirected to the homepage after logging in.
No dramatic changes, really; it just makes the login flow more transparent for users and the code more robust (i.e. a logged-in component never gets rendered when the user is logged out and vice-versa).
Edited by Axel Bocciarelli