Serialize registration form into json