issue with res.json followed by res.end call in logout code
 Fixes #550
Merge pull request #551 from adaptlearning/issues/550

 issue with res.json followed by res.end call in logout code