Authentication System

hey guys

i am developing a simple scripts in lua for using in a game as an addon , i want to add authentication system for using this addon ingame , i want players to login for using this and it should check file config.lua for username and password and it will check the key from a database and if that was true then rest of lua will work and if not script will not run ingame 

appreciated if someone helps me to do this

thanks so much