server: write clients information into database after connecting