add session functionality for login