added checkAuth method for user defined auth