mover auth to db