refactor page controller - outsource user logic into user model