Reduced indentation levels, broke long lines.

Reversed login a two cases to get there.

Also updated PHPDoc, removed an unneeded comment and removed superfluous
newlines.

Change-Id: Ica5f7d24171e2eaeccc0743f8800e18cf2de8006