Login through database begin