Fix bug that doesn't retain the saved credentials