move Facebook code from main controller to user controller