fix db failure on login