Fix authentication problem with jwt middleware