Factored ouptut toggles into a directive.

Also added login failure message.