Lazy loading and automatic renewing of sessions, improves caching and usability

As per #1685