Remove the infinite loop in 'login' if there is no STDIN.

It left my Jenkins build script running forever.

This PR limits the `askAndValidate()` call using the [`$attempts`](http://api.symfony.com/2.5/Symfony/Component/Console/Helper/DialogHelper.html#method_askAndValidate) parameter.