Changes needed for GateIn+OAuth2 integration