Added some logic in Register User