login+logout + some fixes