Sundry fixes to parts of the login process BraveCore used

* Fix mapping of secondary login paths to auth methods
* Import flask.request into Core auth module
* Delay giving Core users a name for a bit
* Use sets for User.groups and Group.users
Remove an old debugging line from the login view
More precisely transmit which entity was selected with typeahead

This method requires javascript, but frankly, enough of this app is built using javascript, it's basically a requirement now.