-- = Logging in
-- | provide data from a login request 
signInProvider :: SignInRequest -> Query Morgue SignInData
signInProvider (SignInRequest creds key) = do
    morgue <- ask
    return ( cPass creds
           , getOne $ allUsers morgue @= cName creds
           , key
           )

-- | process user data in order to login
signInProvider :: SignInRequest -> Query Morgue SignInData
signInProvider (SignInRequest creds key) = do
    morgue <- ask
    return ( cPass creds
           , getOne $ allUsers morgue @= cName creds
           , key
           )

-- | process user data in order to login
signInProvider (SignInRequest creds key) = do
    morgue <- ask
    return ( cPass creds
           , getOne $ allUsers morgue @= cName creds
           , key
           )

-- | process user data in order to login