Moving login/session fns over to new db