added routines for client keep-alive and forced logout on idle