updated to use email as userid