public void Execute(object parameter) { APIService service = new APIService(); User user = service.AuthenticateUser(Model.UserName, (parameter as PasswordBox).Password); if (user == null) { MessageBox.Show("Invalid Username or Password"); return; } DwwebRhinoPlugin.Instance.LoggedInUser = user; MessageBox.Show("Login Successful!"); UserProfile view = new UserProfile(new TestDataService()); Model.CloseAction(); view.Show(); }