use database for keeping login status