changes to send new codes and improvments to validation on userdetails