refactored profiles and accounts. replaced function view to CBV.