I initially asked a question [here](https://craftcms.stackexchange.com/questions/35917/is-it-possible-recommended-to-use-solspace-freeform-for-a-front-end-user-login-f/35918#35918) about how to use Solspace Freeform to build a custom front-end login form. I gave up too easily and accepted the "it's possible but probably not a good idea" answer. Full disclosure: I'm still trying to see if I can use Freeform as a replacement for all of the stock Craft front-end forms (login, user profile, entry, etc). There is so much available out of the box with Freeform in terms of form validation rules and styling, I really want to leverage that for all my forms.

* I have a Freeform login form with the appropriate fields
* In my custom module, I'm hooking into Freeform's [EVENT\_FORM\_VALIDATE](https://docs.solspace.com/craft/freeform/v3/developer/form-events.html#on-validating-the-form)
* At this point the `Craft::$app->request` object has everything that the `craft\controllers\UsersController`'s `actionLogin()` method would need to attempt to log the user in
* Is there some way to "hand off" the current request to the `UsersController`?
* If the login is successful, will the `UsersController` go about its business and redirect the user properly?
* If the login fails, I can add errors the Freeform's response as needed
* Is this a terrible idea? Is there a better way to accomplish this?