return json for xhr request not a redirect
Merge pull request #16 from asceth/master

return json for xhr request not a redirect