Fix import * only allowed at module level in assign_login