/// <summary>
        /// Creates new PIN by storing it in hashed file
        /// </summary>
        private void CreatePIN()
        {
            // Check if both PIN matches
            if (!DoesRepeatedPINMatch())
            {
                ErrorMessage = LocalizationResource.RepeatedPINNotSame;
                return;
            }

            // Save the PIN
            FileDataHasher.HashAndSaveString(PIN);

            // Log the user in by changing the page
            IoCServer.Application.GoToPage(ApplicationPage.Home);
        }
        /// <summary>
        /// Default constructor
        /// </summary>
        public LoginViewModel()
        {
            // Create commands
            LoginCommand     = new RelayCommand(Login);
            CreatePINCommand = new RelayCommand(CreatePIN);

            // Check if pin is set
            FoundPIN = FileDataHasher.ReadAndUnhashString();

            // If its not empty and has 4 characters to ensure its not modified
            if (!string.IsNullOrEmpty(FoundPIN) && FoundPIN.Length == 4)
            {
                // Valid PIN was found
                PINFound = true;
            }
        }