Added authenticate method