Fix authentication, misc. formatting.