FIXED: Standardization of the SQL queries
FIXED: Add a flag and variable for live or test authorization