Updated with Database Authentication