Fixed various issues with logged users.