check login with DB