diff --git a/Happstack/Authenticate/Core.hs b/Happstack/Authenticate/Core.hs
--- a/Happstack/Authenticate/Core.hs
+++ b/Happstack/Authenticate/Core.hs
@@ -32,7 +32,82 @@
 
 -}
 
-module Happstack.Authenticate.Core where
+module Happstack.Authenticate.Core
+    ( HappstackAuthenticateI18N(..)
+    , UserId(..)
+    , unUserId
+    , rUserId
+    , succUserId
+    , jsonOptions
+    , toJSONResponse
+    , toJSONSuccess
+    , toJSONError
+    , Username(..)
+    , unUsername
+    , rUsername
+    , Email(..)
+    , unEmail
+    , User(..)
+    , userId
+    , username
+    , email
+    , UserIxs
+    , IxUser
+    , SharedSecret(..)
+    , unSharedSecret
+    , genSharedSecret
+    , genSharedSecretDevURandom
+    , genSharedSecretSysRandom
+    , SharedSecrets
+    , initialSharedSecrets
+    , CoreError(..)
+    , NewAccountMode(..)
+    , AuthenticateState(..)
+    , sharedSecrets
+    , users
+    , nextUserId
+    , defaultSessionTimeout
+    , newAccountMode
+    , initialAuthenticateState
+    , SetSharedSecret(..)
+    , GetSharedSecret(..)
+    , SetDefaultSessionTimeout(..)
+    , GetDefaultSessionTimeout(..)
+    , SetNewAccountMode(..)
+    , GetNewAccountMode(..)
+    , CreateUser(..)
+    , CreateAnonymousUser(..)
+    , UpdateUser(..)
+    , DeleteUser(..)
+    , GetUserByUsername(..)
+    , GetUserByUserId(..)
+    , GetUserByEmail(..)
+    , GetAuthenticateState(..)
+    , getOrGenSharedSecret
+    , Token(..)
+    , tokenUser
+    , tokenIsAuthAdmin
+    , TokenText
+    , issueToken
+    , decodeAndVerifyToken
+    , authCookieName
+    , addTokenCookie
+    , deleteTokenCookie
+    , getTokenCookie
+    , getTokenHeader
+    , getToken
+    , getUserId
+    , AuthenticationMethod(..)
+    , unAuthenticationMethod
+    , rAuthenticationMethod
+    , AuthenticationHandler
+    , AuthenticationHandlers
+    , AuthenticateURL(..)
+    , rAuthenticationMethods
+    , rControllers
+    , authenticateURL
+    , nestAuthenticationMethod
+    ) where
 
 import Control.Applicative             (Applicative(pure), Alternative, (<$>), optional)
 import Control.Category                ((.), id)
@@ -65,6 +140,7 @@
 import qualified Data.Text             as Text
 import qualified Data.Text.Encoding    as Text
 import Data.Time                       (UTCTime, addUTCTime, diffUTCTime, getCurrentTime)
+import Data.UserId                     (UserId(..), rUserId, succUserId, unUserId)
 import GHC.Generics                    (Generic)
 import Happstack.Server                (Cookie(secure), CookieLife(Session, MaxAge), Happstack, ServerPartT, Request(rqSecure), Response, addCookie, askRq, expireCookie, getHeaderM, lookCookie, lookCookieValue, mkCookie, notFound, toResponseBS)
 import Language.Javascript.JMacro
@@ -104,7 +180,7 @@
 ------------------------------------------------------------------------------
 -- UserId
 ------------------------------------------------------------------------------
-
+{-
 -- | a 'UserId' uniquely identifies a user.
 newtype UserId = UserId { _unUserId :: Integer }
     deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
@@ -122,7 +198,7 @@
 -- | get the next `UserId`
 succUserId :: UserId -> UserId
 succUserId (UserId i) = UserId (succ i)
-
+-}
 ------------------------------------------------------------------------------
 -- Username
 ------------------------------------------------------------------------------
diff --git a/Happstack/Authenticate/OpenId/Core.hs b/Happstack/Authenticate/OpenId/Core.hs
--- a/Happstack/Authenticate/OpenId/Core.hs
+++ b/Happstack/Authenticate/OpenId/Core.hs
@@ -23,8 +23,9 @@
 import qualified Data.Text.Lazy          as TL
 import qualified Data.Text.Lazy.Encoding as TL
 import qualified Data.Map          as Map
+import Data.UserId                 (UserId)
 import GHC.Generics                (Generic)
-import Happstack.Authenticate.Core (AuthenticateState, UserId(..), CoreError(..), CreateAnonymousUser(..), GetUserByUserId(..), HappstackAuthenticateI18N(..), addTokenCookie, getToken, jsonOptions, toJSONError, toJSONSuccess, toJSONResponse, tokenIsAuthAdmin, userId)
+import Happstack.Authenticate.Core (AuthenticateState, CoreError(..), CreateAnonymousUser(..), GetUserByUserId(..), HappstackAuthenticateI18N(..), addTokenCookie, getToken, jsonOptions, toJSONError, toJSONSuccess, toJSONResponse, tokenIsAuthAdmin, userId)
 import Happstack.Authenticate.OpenId.URL
 import Happstack.Server            (RqBody(..), Happstack, Method(..), Response, askRq, unauthorized, badRequest, internalServerError, forbidden, lookPairsBS, method, resp, takeRequestBody, toResponse, toResponseBS, ok)
 import Language.Javascript.JMacro
diff --git a/Happstack/Authenticate/OpenId/Partials.hs b/Happstack/Authenticate/OpenId/Partials.hs
--- a/Happstack/Authenticate/OpenId/Partials.hs
+++ b/Happstack/Authenticate/OpenId/Partials.hs
@@ -10,13 +10,14 @@
 import Data.Monoid                          ((<>))
 import Data.Maybe                           (fromMaybe)
 import Data.Text                            (Text)
+import Data.UserId                          (UserId)
 import qualified Data.Text                  as Text
 import qualified Data.Text.Lazy             as LT
 import HSP
 import Happstack.Server.HSP.HTML            ()
 import Language.Haskell.HSX.QQ              (hsx)
 import Language.Javascript.JMacro
-import Happstack.Authenticate.Core          (AuthenticateState, AuthenticateURL, UserId(..), User(..), HappstackAuthenticateI18N(..), getToken)
+import Happstack.Authenticate.Core          (AuthenticateState, AuthenticateURL, User(..), HappstackAuthenticateI18N(..), getToken)
 import Happstack.Authenticate.OpenId.Core   (OpenIdState(..), GetOpenIdRealm(..))
 import Happstack.Authenticate.OpenId.URL    (OpenIdURL(..), nestOpenIdURL)
 import Happstack.Authenticate.OpenId.PartialsURL  (PartialURL(..))
diff --git a/Happstack/Authenticate/OpenId/Route.hs b/Happstack/Authenticate/OpenId/Route.hs
--- a/Happstack/Authenticate/OpenId/Route.hs
+++ b/Happstack/Authenticate/OpenId/Route.hs
@@ -8,7 +8,8 @@
 import Data.Acid.Advanced    (query')
 import Data.Acid.Local       (createCheckpointAndClose, openLocalStateFrom)
 import Data.Text             (Text)
-import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod, AuthenticateState, AuthenticateURL, CoreError(..), UserId, toJSONError, toJSONResponse)
+import Data.UserId           (UserId)
+import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod, AuthenticateState, AuthenticateURL, CoreError(..), toJSONError, toJSONResponse)
 import Happstack.Authenticate.OpenId.Core (GetOpenIdRealm(..), OpenIdError(..), OpenIdState, initialOpenIdState, realm, token)
 import Happstack.Authenticate.OpenId.Controllers (openIdCtrl)
 import Happstack.Authenticate.OpenId.URL (OpenIdURL(..), openIdAuthenticationMethod, nestOpenIdURL)
diff --git a/Happstack/Authenticate/OpenId/URL.hs b/Happstack/Authenticate/OpenId/URL.hs
--- a/Happstack/Authenticate/OpenId/URL.hs
+++ b/Happstack/Authenticate/OpenId/URL.hs
@@ -4,9 +4,10 @@
 import Control.Category                ((.), id)
 import Data.Data     (Data, Typeable)
 import Data.Text     (Text)
+import Data.UserId   (UserId, rUserId)
 import GHC.Generics  (Generic)
 import Prelude                         hiding ((.), id)
-import Happstack.Authenticate.Core          (AuthenticateURL, AuthenticationMethod(..), UserId(..), nestAuthenticationMethod, rUserId)
+import Happstack.Authenticate.Core          (AuthenticateURL, AuthenticationMethod(..), nestAuthenticationMethod)
 import Happstack.Authenticate.OpenId.PartialsURL (PartialURL(..), partialURL)
 import Text.Boomerang.TH               (makeBoomerangs)
 import Web.Routes    (PathInfo(..), RouteT(..))
diff --git a/Happstack/Authenticate/Password/Core.hs b/Happstack/Authenticate/Password/Core.hs
--- a/Happstack/Authenticate/Password/Core.hs
+++ b/Happstack/Authenticate/Password/Core.hs
@@ -28,8 +28,9 @@
 import qualified Data.Text.Encoding as Text
 import qualified Data.Text.Lazy     as LT
 import Data.Time.Clock.POSIX          (getPOSIXTime)
+import Data.UserId (UserId)
 import GHC.Generics (Generic)
-import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod(..), AuthenticateState(..), AuthenticateURL, CoreError(..), CreateUser(..), Email(..), GetUserByUsername(..), HappstackAuthenticateI18N(..), SharedSecret(..), UserId(..), User(..), Username(..), GetSharedSecret(..), addTokenCookie, email, getToken, getOrGenSharedSecret, issueToken, jsonOptions, userId, username, toJSONResponse, toJSONError, tokenUser)
+import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod(..), AuthenticateState(..), AuthenticateURL, CoreError(..), CreateUser(..), Email(..), GetUserByUsername(..), HappstackAuthenticateI18N(..), SharedSecret(..), User(..), Username(..), GetSharedSecret(..), addTokenCookie, email, getToken, getOrGenSharedSecret, issueToken, jsonOptions, userId, username, toJSONResponse, toJSONError, tokenUser)
 import Happstack.Authenticate.Password.URL (AccountURL(..))
 import Happstack.Server
 import HSP.JMacro
diff --git a/Happstack/Authenticate/Password/Partials.hs b/Happstack/Authenticate/Password/Partials.hs
--- a/Happstack/Authenticate/Password/Partials.hs
+++ b/Happstack/Authenticate/Password/Partials.hs
@@ -9,13 +9,14 @@
 import Data.Data                            (Data, Typeable)
 import Data.Monoid                          ((<>))
 import Data.Text                            (Text)
+import Data.UserId                          (UserId)
 import qualified Data.Text                  as Text
 import qualified Data.Text.Lazy             as LT
 import HSP
 import Happstack.Server.HSP.HTML            ()
 import Language.Haskell.HSX.QQ              (hsx)
 import Language.Javascript.JMacro
-import Happstack.Authenticate.Core          (AuthenticateState, AuthenticateURL, UserId(..), User(..), HappstackAuthenticateI18N(..), getToken, tokenUser, userId)
+import Happstack.Authenticate.Core          (AuthenticateState, AuthenticateURL, User(..), HappstackAuthenticateI18N(..), getToken, tokenUser, userId)
 import Happstack.Authenticate.Password.Core (PasswordError(NotAuthenticated))
 import Happstack.Authenticate.Password.URL  (AccountURL(..), PasswordURL(..), nestPasswordURL)
 import Happstack.Authenticate.Password.PartialsURL  (PartialURL(..))
diff --git a/Happstack/Authenticate/Password/Route.hs b/Happstack/Authenticate/Password/Route.hs
--- a/Happstack/Authenticate/Password/Route.hs
+++ b/Happstack/Authenticate/Password/Route.hs
@@ -5,7 +5,8 @@
 import Data.Acid             (AcidState, closeAcidState, makeAcidic)
 import Data.Acid.Local       (createCheckpointAndClose, openLocalStateFrom)
 import Data.Text             (Text)
-import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod, AuthenticateState, AuthenticateURL, CoreError(..), UserId, toJSONError, toJSONResponse)
+import Data.UserId           (UserId)
+import Happstack.Authenticate.Core (AuthenticationHandler, AuthenticationMethod, AuthenticateState, AuthenticateURL, CoreError(..), toJSONError, toJSONResponse)
 import Happstack.Authenticate.Password.Core (PasswordError(..), PasswordState, account, initialPasswordState, passwordReset, passwordRequestReset, token)
 import Happstack.Authenticate.Password.Controllers (usernamePasswordCtrl)
 import Happstack.Authenticate.Password.URL (PasswordURL(..), passwordAuthenticationMethod)
diff --git a/Happstack/Authenticate/Password/URL.hs b/Happstack/Authenticate/Password/URL.hs
--- a/Happstack/Authenticate/Password/URL.hs
+++ b/Happstack/Authenticate/Password/URL.hs
@@ -3,11 +3,12 @@
 
 import Control.Category                ((.), id)
 import Data.Data     (Data, Typeable)
+import Data.UserId   (UserId(..), rUserId)
 import GHC.Generics  (Generic)
 import Prelude                         hiding ((.), id)
 import Web.Routes    (RouteT(..))
 import Web.Routes.TH (derivePathInfo)
-import Happstack.Authenticate.Core          (AuthenticateURL, AuthenticationMethod(..), UserId(..), nestAuthenticationMethod, rUserId)
+import Happstack.Authenticate.Core          (AuthenticateURL, AuthenticationMethod(..), nestAuthenticationMethod)
 import Happstack.Authenticate.Password.PartialsURL (PartialURL(..), partialURL)
 import Text.Boomerang.TH               (makeBoomerangs)
 import Web.Routes                      (PathInfo(..))
diff --git a/Happstack/Authenticate/Route.hs b/Happstack/Authenticate/Route.hs
--- a/Happstack/Authenticate/Route.hs
+++ b/Happstack/Authenticate/Route.hs
@@ -10,9 +10,10 @@
 import Data.Monoid (mconcat)
 import Data.Traversable (sequence)
 import Data.Unique (hashUnique, newUnique)
+import Data.UserId (UserId)
 import HSP.JMacro (IntegerSupply(..))
 import Happstack.Authenticate.Controller (authenticateCtrl)
-import Happstack.Authenticate.Core (AuthenticateState, AuthenticateURL(..), AuthenticationHandler, AuthenticationHandlers, AuthenticationMethod, CoreError(HandlerNotFound), UserId, initialAuthenticateState, toJSONError)
+import Happstack.Authenticate.Core (AuthenticateState, AuthenticateURL(..), AuthenticationHandler, AuthenticationHandlers, AuthenticationMethod, CoreError(HandlerNotFound), initialAuthenticateState, toJSONError)
 import Happstack.Server (notFound, ok, Response, ServerPartT, ToMessage(toResponse))
 import Happstack.Server.JMacro ()
 import Language.Javascript.JMacro (JStat)
diff --git a/happstack-authenticate.cabal b/happstack-authenticate.cabal
--- a/happstack-authenticate.cabal
+++ b/happstack-authenticate.cabal
@@ -1,5 +1,5 @@
 Name:                happstack-authenticate
-Version:             2.1.4
+Version:             2.1.5
 Synopsis:            Happstack Authentication Library
 Description:         A themeable authentication library with support for username+password and OpenId.
 Homepage:            http://www.happstack.com/
@@ -43,7 +43,7 @@
 
   Build-depends:       base                         > 4     && < 5,
                        acid-state                   >= 0.6  && < 0.14,
-                       aeson                        >= 0.4  && < 0.9,
+                       aeson                        >= 0.4  && < 0.10,
                        authenticate                 == 1.3.*,
                        base64-bytestring            >= 1.0  && < 1.1,
                        boomerang                    >= 1.4  && < 1.5,
@@ -65,10 +65,11 @@
                        safecopy                     >= 0.8  && < 0.9,
                        mime-mail                    >= 0.4  && < 0.5,
                        mtl                          >= 2.0  && < 2.3,
-                       lens                         >= 4.2  && < 4.10,
+                       lens                         >= 4.2  && < 4.13,
                        pwstore-purehaskell          == 2.1.*,
                        text                         >= 0.11 && < 1.3,
                        time                         >= 1.2  && < 1.6,
+                       userid                       >= 0.1  && < 0.2,
                        random                       >= 1.0  && < 1.2,
                        shakespeare                  >= 2.0  && < 2.1,
                        unordered-containers         == 0.2.*,
