fixed DB login bug and about to add timer