Updated authentication method to check userinfo directly