added a check to see whether email is already in db and prevent insertion if so. also added primary key