Partial authentication implementation and some style changes.
Merge commit '5c4cc7b73203f2716984c252c1e3bb85a7604d65'