fixed login issue
restored keepalive cleanup