[FEATURE] move remote connected check to router

and various other error handling and cleanups