Create a Login Page and create roles for admins and staff
Objective:
- Create a role-based login system to manage access for different users within the application.
Requirements:
- Login Page: Develop a login interface where users can authenticate. User Roles:
- Admins: Should have access to both the admin and staff pages upon successful login.
- Staff Members: Should only have access to the staff page post login.
- Routing:
- Implement routing logic to direct users based on their roles after login. Expected Behavior:
- Admin users, upon successful login, will be able to navigate to both admin and staff pages.
- Staff users, upon successful login, will be directed only to the staff page. Additional Notes:
- Utilize React Router or suitable routing mechanisms to manage access.
- Authentication should be based on user roles retrieved from the backend. Tasks:
- Create login page components.
- Implement authentication logic based on user roles.
- Set up routing to direct users to appropriate pages after login. Optional:
- Enhance security measures, such as encryption for sensitive data during authentication.