implement Json and Redirect
add log and recover