If you set UserName and Password properties of TRemoteDBServer, it will check automatically. Why do you need an event, exactly?
You can also simply use the regular TMS Sparkle authentication system, either using the Basic authenticatio middleware (like in this example) or the JWT middleware as described in documentation.