fixed error handling. removed companyname field in registration.