moved user and account model logic to front end app