Invalidate login request when disconnected

If socket breaks, we won't be logging in anymore, so we should report that as an error
to layers upwards and also cancel internal login state.