Test: use direct link instead of javascript
OAuth2: better error handling