private void btnSignin_Click(object sender, RoutedEventArgs e)
        {
            DBConnect     dbcon = new DBConnect();
            SqlConnection con   = dbcon.Connect();

            try
            {
                if (con.State == ConnectionState.Closed)
                {
                    con.Open();
                    int usercheck = DBQueries.CheckExistingUser(con, txtUsername.Text);
                    if (usercheck == 0)
                    {
                        DBQueries.RegisterNewUser(con, txtUsername.Text, txtPassword.Password);
                        MessageBox.Show("You can now log in!");
                        loginScreen logScreen = new loginScreen();
                        logScreen.Show();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Login already taken!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                con.Close();
            }
        }
        private void logout_Click(object sender, RoutedEventArgs e)
        {
            loginScreen logscr = new loginScreen();

            logscr.Show();
            this.Close();
        }