Authentication flow.

Added flow for authentication in addition to the current authorization flow.