applying authentication