changed login codes for LoginDatabase