Updated to check for email already existed