modified session library for handling user cookies