User login method

I was doing an UI which when user register and jump to login UI, and type correctly of the username and password, then when click on the loginButton it will direct to a website.

The problem that I encountering is that when I click on the loginButton, it direct to the website, BUT when I’m not typing anything or username and password incorrect, it will still can direct to the website when I click on the loginButton.

What’s the problem?

If you want people to help you, you'll need to share the code in question. I would guess that a good starting point would be to share the code that you think SHOULD be checking the username and password.