Is there a way to rewrite (or alter?) how redwood get user data that matches the data provided at login?

I want to adding a functionality that user can provide an email OR username, and password to logged in, is there a way to do that?

Thanks!