How to setup custom login button with code? Urgent help!

Hello!
I really need urgent help in this.
I have created my own Lightbox to be used for users to login. In order to login, you have to enter your email and password. So, what code is to be used that will check if the email and password entered are in the wixCRM, if they match and are a member in the system. If so, then they successfully login. Otherwise, they get a message that the password and email are incorrect. What code is to be used for this?
I am in desperate need of help. I’ll be waiting for your reply. Thank you!!