Fix encoding of identity parameter in URL

So no spaces or weird symbols are parsed incorrect.