I fixed up this project yesterday with the following changes:
- Restructured so that the login/signup are not inside the data context provider
- Created new context provider for user authentication
- Added error handling in the UI
- User is redirected to login if they access dashboard route without being logged in