fix to login and user caching. maybe the last?