Authentication form: directive: extract a handler object

This makes the $scope.authenticate() methodeasier to make sense of.
make stage: make test now runs all the tests by default