Implement the full auth flow.