added function to handle session expiry