check auth on route change