cleaned up unused imports, added login-check to join/leave