[pattarasai] add login db and query