more work on the account system #244 and fixed #261