add login session database and implement the logic when user login
(record all the devices, and keep only one device to be active under
same uid and lid)