added checkAuth