Updated authentication method