Added support for scope field in getLoginUrl()