it's a dirty code to redirect to google and yahoo oauth2..
function process_google() {
var self = this;
var google = self.module('google');
if(!self.get['openid.mode']){
var code = '';
}else{
if(self.get['openid.mode']=='cancel'){
self.redirect('/');
}else{
var code = self.get['openid.mode'];
}
}
if (code === '') {
var url = google.redirect(self.host('/login/google/'));
self.redirect(url);
return;
}
else{
self.json(self.get['openid.mode']);
}