Made the Login work in conjunction with Main Window