[Vivian and Michael] adding logout implementation and expiry of sessions