fixed multiple bases

Fixed multiple bases per user and various other enhancements.