async Task Login() { IsBusy = true; try { Model.Models.Klijenti klijent = await _service.Authenticiraj <Model.Models.Klijenti>(Username, Password); if (klijent != null) { Global.PrijavljeniKlijent = klijent; await Application.Current.MainPage.DisplayAlert("Uspjeh", "Dobrodosli " + klijent.Ime + " " + klijent.Prezime, "OK"); Application.Current.MainPage = new MainPage(); } else { await Application.Current.MainPage.DisplayAlert("Greska", "Pogresno unesen username ili password", "OK"); } } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Greska", ex.Message, "OK"); } }