Before Login Microflow

I'm making a widget to allow for a before login microflow to execute and do some stuff prior to executing mx.login. Is there not something like that already in Mendix I can use?
1 answers

According to this page, "Login behavior can be customized by implementing a custom Java action and registering it to be used instead of the default login action”.

How to do the registration etc. requires some further investigation though, but I've seen similar questions on the forum.