private void Contracts(object sender, EventArgs e)
        {
            var isConnected = InternetConnection.InternetCheck();

            if (isConnected)
            {
                Navigation.PushAsync(new ContractPage()
                {
                    BackgroundColor = Color.FromHex("#127ac7")
                });
            }
            if (!isConnected)
            {
                App.Current.MainPage.DisplayAlert("Greška", "Provjerite vašu internet vezu.\nPotrebno je koristiti Wi-Fi ili mobilni internet.", "Uredu");
            }
        }
        private async void RestAccessAsync()
        {
            var isConnected = InternetConnection.InternetCheck();

            if (isConnected && !Loading)
            {
                var studentServices = new StudentServices();
                if (StudentLoginInfo.jmbg != "")
                {
                    Loading          = true; //activityIndicator
                    StudentLoginInfo = await studentServices.GetStudentLoginAsync(StudentLoginInfo.jmbg);

                    if (StudentLoginInfo.Token != null)
                    {
                        StudentObject = await studentServices.GetStudentObjectAsync(StudentLoginInfo.Token);

                        sToken = StudentLoginInfo.Token;                                      //spremanje tokena

                        var imageSoruce = await studentServices.GetStudentImageAsync(sToken); //dohvacanje slike

                        sImage = imageSoruce;

                        if (StudentObject != null)
                        {
                            var studentInfo = GetStudentInfo(); //spremanje podataka
                            await Application.Current.MainPage.Navigation.PushAsync(new MainPage(studentInfo));
                        }
                    }
                    else if (StudentLoginInfo.Token == null)
                    {
                        Loading = false;
                        await App.Current.MainPage.DisplayAlert("Obavijest", "Pogrešan unos, pokušajte ponovo.", "Uredu");
                    }
                }
                else
                {
                    await App.Current.MainPage.DisplayAlert("Obavijest", "Potrebno je ispuniti polje korisnička oznaka za prijavu - JMBAG.", "Uredu");

                    //return;
                }
            }
            if (!isConnected)
            {
                await App.Current.MainPage.DisplayAlert("Greška", "Provjerite vašu internet vezu.\nPotrebno je koristiti Wi-Fi ili mobilni internet.", "Uredu");
            }
        }