I have created a fuction for opening a connection to the database and validating the input from user. I then created another function to login in which will call the databas