private bool TryLogin(string username, string password) { try { RemoteServer.Login(new User { Username = username, Password = password }); return(true); } catch (AuthenticationException) { return(false); } }