I would like...
A separate file a La BD(or state radacovsky) where you would store the data. If authorization is successful(i.e. podmazyvanie the data from the database) would perform the function that redirects the user to his page.
Or just look at this page, there certainly was not word for word, but the correct reading can be something to get:
How to implement redirect to react?