Added registration function

I basically just created the whole registration function, included mysql
functions by making a db.js file to minimize the code needed to run SQL
commands.