finish login and repair jdbc connection