Just FYI this code doesn't work in NodeBB hosted. If I use this widget, when I try to login it returns a white page that says "Forbidden".
Also, when this widget is in place and I try to use the proper login form (top right hand corner), then when logging in using that form returns a white page that shows "/".
However if I reload the home page then I actually log in.
When I removed the widget the normal login page worked.
From an ease of use perspective it seems like it would make sense to have this as a separate pre-built widget.