API now creates and accepts session key

Added some todos in imree.session.php