Fixing session handling in iRODS

Session handling in OC6 changed and the irods credentials have not been stored in the session any more.

In addition the check for using the credentials has been fixed.

@karlitschek @bantu @bartv2 @icewind1991 THX

backport to stable5 required