handleNewUser :: H ()
handleNewUser = method POST newUser
  where
    newUser = runHttpErrorExceptT $ do
      login      <- lift reqJSON
      userOrErr  <- lift $ with jwt $ J.createUser (lpLogin login) (lpPass login)
      return (either handleLoginError loginOK userOrErr)
handleNewUser :: H ()
handleNewUser = method POST newUser
  where
    newUser = runHttpErrorExceptT $ do
      login      <- lift reqJSON
      userOrErr  <- lift $ with jwt $ J.createUser (lpLogin login) (lpPass login)
      return (either handleLoginError loginOK userOrErr)
handleNewUser = method POST newUser
  where
    newUser = runHttpErrorExceptT $ do
      login      <- lift reqJSON
      userOrErr  <- lift $ with jwt $ J.createUser (lpLogin login) (lpPass login)
      return (either handleLoginError loginOK userOrErr)