added key_input table; made pre-auth and terms and conditions dynamic from server