Added conditional logic for sign-in and hasPeople.