moved another query from login, moved query from logout to dbadapter