added support for OAuth2 client web-server flow

added support for web-server flow and "type" parameter, as specified by http://tools.ietf.org/html/draft-ietf-oauth-v2-07 and http://tools.ietf.org/html/draft-ietf-oauth-v2-07#section-4.1.1