changed authentication check