Better handling of auth credentials