changes authenticate method