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");
            }
        }