cleanup + loggedin property + threading work