fix middleware problem in accounts test