Cperello/nginx reverse proxy

This set of changes fixes all regressions with remote and users modules from the migration to nginx. I tested it with remote and I was able to execute jobs and login without a password.