Created functionality for checking logon credentials.
If user enters username and password correctly, then close the window. Else, do nothing