Ok, now I've made a simple login system using inkey and a short sql query. It works quite well actually. First it takes input from the user stating both username and password, then it puts that information into a string containing a query for the a record with this username and password in the users table. If there is no such record it terminates, if it exists it continues to load information about the user from the db.