implemented IsValidDevice and IsValidUser