fix bug: check for user first before doing email check