Update oauth2.js

add redirect option