fixed bug (normally in development) where session user id state gets out of sync with db