A few commits to support better authentication handling.