Features for Gitlab integration

Here is working version of updates required to make omniauth-pam work well with gitlab.

Mainly this adds some common enchantments to make omniauth-pam better.