Added JSON errors to ApplicationController