authorizes and deauthorizes based on presence of approved devices
added switching functionality