checkAPITokenAndPutItInContext now returns 401 Unauthorized when the token owner's account is disabled or locked, instead of a 500 error. Also fixes the API token test to match the actual middleware behavior.