fixed potential fd leak
implemented meta API's basic auth
generating meta API
refactored meta api building and basic auth
basic auth togglers now refresh meta API