login with database connection