Fixes to authentication spec, code review change.