Added DBConnect class
Changed login & tick functions to execute SQL queries