improved checkUser handling