Add Xi's database connection. Fix the username generation algorithm