Fixing session permissions