BS-10870, fix session not found when executing works without a session, there is now  method getLoggedUserFromSession that return -1 when the session does not exists