fixing session start issue and caching permissions