logout data race issuse