Unnecesarily treamlined some sqlite queries
Fixed reading of login tickets containing exotic characters - massive thanks to Opira for helping me track this one down