Main logic moved to MainWindow.xaml.cs

Main logic moved from ApplicationManager to MainWindow.xaml.cs, slight modifications in Login.xaml