Add Oauth implementation. Fix some roundrobin and user registration
code.