fix connection after authentication