Comparing user's data with list data in Firebase

I have login codes saved in a list in Firebase. When the user clicks on the button, if the code entered by the user coincides with any of the items in the list in Firebase, a notifier will appear on the screen writing but the system is not working, where is my mistake?