fix some bugs on liber.oauth.js