Authentication flow tweaks.
Documentation update.