whitespace
Turn authentication into a controller

This code doesn't do any DOM manipulation so its better kept as a
controller.
Set auth forms to pristine after success

And get rid of the resettable directive. Since Angular added the
`$setPristine` method, we can wrap the errors in a check that the
control is dirty.
Hide the auth sheet after success

Close #1172