Added a test command and fix a database bug.
refactor the codes and add a model of account.
added a simple test for account.