Without the proxy_http_version and proxy_header upgrades an the nginx subdomain setup generates socket errors on the login page. This makes that users can't login. Adding the websocket lines both to the "/" location as well as the "/api/websocket" location solves the issue.
Solution copied from: KickHackerz, mar 1 answer on https://community.home-assistant.io/t/ngnix-so-confused-doing-something-wrong/12736/3.