In the sign up route, save the user to the DB and generate a JWT token and send it to the client.
In the login route, validate the user's password against the DB, if correct generate JWT token and send it to the client.
In the client, after receiving JWT token, save it to the local storage and to the context.
Decode the token and save it to the context when the app starts up.
Add the token to every request after the client has been authenticated.
In the back-end verify the JWT token before handling requests in protected routes.