fixes  #1308 by becoming more resiliant to datum iwth missing sessions, and puttin the session that caome from the db, no thte active session

TODO investigate more!