working with openAM

finally got it working with openam oauth2 openid connect implementation. I believe this is also openID connect compliant. Fixed some inconsistencies from the document this implementation had. Also, the token request phase was behaving badly, made a quick fix not very clean though. Would be useful if you find a better fix.