login redirect for dashboard, better error handling