Write data base code and login server