Just like Lonkero says, use login scripts. if a DC is not available, there is no login script to run.