Added unit and functional tests for accounts.