adding sessions and logout