Merge authentication and session start.
Indentation fixes.