Fixed DB file and login/logout