issue #564 ajax will produce a json error if the session is timed out