Added checkToken middleware