 
     (fact "can sign out of stonecutter"
           (wd/to (str scheme "://" stonecutter-url "/sign-out"))
-          (wait-for-selector stonecutter-sign-in-page-body)
-          (wd/current-url) => (contains (str stonecutter-url "/sign-in")))
+          (wait-for-selector stonecutter-index-page-body)
+          (wd/current-url) => (contains (str stonecutter-url "/")))
 
     (fact "can go to client page"
           (wd/to (str scheme "://" stonecutter-client-url))


    (fact "'sign in to vote' redirects to stonecutter"
          (wd/click "button")
          (wait-for-selector stonecutter-sign-in-page-body)
          (screenshot "stonecutter_sign_in")
          (wd/current-url) => (contains (str stonecutter-url "/sign-in")))

    (fact "can sign in with existing user credentials and redirects to authorisation form page"
          (input-sign-in-credentials-and-submit)

(def scheme (get env/env :scheme "https"))

(def stonecutter-url (get env/env :stonecutter-url "sso-staging.dcentproject.eu"))
(def stonecutter-index-page-body ".func--index-page")
(def stonecutter-sign-in-email-input ".func--sign-in-email__input")
(def stonecutter-sign-in-password-input ".func--sign-in-password__input")
(def stonecutter-sign-in-button ".func--sign-in__button")
(def stonecutter-register-email-input ".func--registration-email__input")
(def stonecutter-register-password-input ".func--registration-password__input")
(def stonecutter-register-confirm-password-input ".func--registration-confirm-password__input")
(def stonecutter-register-create-profile-button ".func--create-profile__button")
(def stonecutter-profile-page-body ".func--profile-page")
(def stonecutter-profile-unshare-profile-card-link ".func--app-item__unshare-link")
