                   :summary "Get languages"
                   (if (private? ctx)
                     (forbidden)
-                    (assoc-in (ok {:languages (get-in ctx [:config :core :languages])}) [:session :seen-terms] true)))
+                  (assoc-in (ok {:languages (get-in ctx [:config :core :languages])}) [:session :seen-terms] true)))
 
              (POST "/register" req
                    ;:return

                   :body [login-content schemas/LoginUser]
                   :summary "User logs in"
                   (let [{:keys [email password]} login-content
                         accepted-terms? (u/accepted-terms? ctx email)
                         login-status (-> (u/login-user ctx email password)
                                          (assoc :terms (:status accepted-terms?)))]
                     (if (= "success" (:status login-status))
                       (u/finalize-login ctx (ok login-status) (:id login-status) (get-in req [:session :pending :user-badge-id]) false)
                       (ok login-status))))

                       (if (not (private? ctx))
                         ;(ok save)
                         (let [login-status (u/login-user ctx email password)]
                           (if (and (= "success" (:status login-status)) (= "success" (:status update-accept-term)) (or (= "accepted" (:input update-accept-term)) (= "disabled" (:input update-accept-term))))
                             (u/finalize-login ctx (ok login-status) (:id login-status) (get-in req [:session :pending :user-badge-id]) true)
                             (ok login-status)))
                         (cond
                           (not (right-token? ctx (:token form-content)))        (forbidden)
                           (not (in-email-whitelist? ctx (:email form-content))) (ok {:status "error" :message "user/Invalidemail"})
                           :else                                                 (let [ login-status  (u/login-user ctx email password)]
                                                                                   (if (and (= "success" (:status login-status)) (= "success" (:status update-accept-term)) (or (= "accepted" (:input update-accept-term)) (= "disabled" (:input update-accept-term))))
                                                                                     (u/set-session ctx (ok login-status) (:id login-status))
                                                                                     (ok login-status))))))))

