1. modify account controller, applying throw mechanism to make the code easier to read
2. modify account template to adapt to fundation framework