Fixed bug where json requests weren't being properly logged out.