adding better authentication method