Better just use 'HOME=$TMPDIR chrome <args... > without the export. With export the Home variable will persist for the current shell, potentially leading to unwanted results.
Seeing the amount of code let's me think of left-pad. Minimal code that should just be part of your own project instead of using a third party dependency.
Also obligatory: don't validate emails, just send the user an email and make them confirm by clicking a link in the mail.
This, combined with the possibility to also show events from gitlab would be really nice, since for work I work with gitlab (which I like better than github).
I use this ansible role to deploy it: https://github.com/spantaleev/matrix-docker-ansible-deploy/
reply