authenticate user before visiting the dashboard