Fix logic checking for both sudo and su, and their respective users