Fix null pointer exception when requesting a list of permissions before ...

...session is active