refactored accounts to ajax