Use json type to handle direct result from action with no template, for Issue #279
Code cleaning up
Merge branch 'user' into permission