Fixed issue to check if user is logged in instead of trying to get a nul...

...l session item