Fix: Database login

fixes #5706