https://mamchenkov.net/wordpress/2015/06/09/sso-with-nginx-auth_request-module/
SSO with Nginx auth_request module