public void LogOut()
 {
     if (!IsLoggedIn)
         throw new InvalidOperationException ();
     currentUser = null;
 }
 public void LogIn(String login, String password)
 {
     if (IsLoggedIn)
         throw new InvalidOperationException ();
     currentUser = new Credentials(login, password);
 }