Better handling of xhr logout (skip redirect + return json)