create checkUser method