You can also put auth in front of the application rather than inside it. For example, using oauth for login with nginx https://github.com/cloudflare/nginx-google-oauth/blob/master/README.md#docker-image 700